Hagakure (Kyūjitai: 葉隱; Shinjitai: 葉隠; meaning Hidden by the Leaves or hidden leaves), or Hagakure Kikigaki (葉隠聞書?) is a practical and spiritual guide for a warrior, drawn from a collection of commentaries by the clerk Yamamoto Tsunetomo, former retainer to Nabeshima Mitsushige, the third ruler of what is now Saga Prefecture in Japan. Tsuramoto Tashiro compiled these commentaries from his conversations with Tsunetomo from 1709 to 1716; however, it was not published until many years afterwards. Hagakure is also known as The Book of the Samurai, Analects of Nabeshima or Hagakure Analects.
The book records Tsunetomo's views on bushido, the warrior code of the samurai. Hagakure is sometimes said to assert that bushido is really the "Way of Dying" or living as though one was already dead, and that a samurai must be willing to die at any moment in order to be true to his lord. His saying "the way of the warrior is death" was a summation of the willingness to sacrifice that bushido codified.
After his master died, Tsunetomo himself was forbidden to perform junshi, a retainer's ritual suicide, by an edict of the Tokugawa Shogunate combined with his master's disapproval of the tradition. Hagakure may have been written partially in an effort to outline the role of the samurai in a more peaceful society. Several sections refer to the "old days", and imply a dangerous weakening of the samurai class since that time.