"...if you are slain in battle, you should be resolved to have your corpse facing the enemy."
Hagakure -- which can be translated as either "hidden leaves" or "hidden by leaves" -- was published on September 10, 1716. It is a compilation of the philosphies of Yamamoto Tsunetomo, a close retainer of Nabeshima Mitsushige, the third ruler of what is now Saga Prefecture.
The book can be very dry, especially if a person is not especially interested in Japanese history or Samurai thought. But if one does enjoy those subjects, Hagakure is interesting not so much for all of its philosophies, which run from the profound to the mundane to the absurd, but rather for the historical context in which it was written. By the time Mitsushige passed away in May 1700, Japan had been at peace for almost exactly 100 years. This left the samurai with the same problem facing our modern military: how do you remain a proud, disciplined warrior in times of extended peace?
Reading carefully for the feeling of the passages rather than just the facts, one gets a sense for how the fanatical, death-driven, honor-obsessed samurai of feudal Japan must have felt as they watched their profession stagnate. Tsunetomo himself was forbidden to commit junshi, a retainer's ritual suicide in order to follow his master into death, by the command of the Tokugawa Shogunate. No doubt, this added to his misery and frustration.
So, in a way, Hagakure is not just "The Book of the Samurai," but also a last bit of verbal bravado from a dying breed. It is particularly ironic if you read the version adapted by one of Japan's most celebrated authors, Mishima Yukio, who commited ritual suicide samurai-style (called hara-kiri or more often seppuku) in the office of Japan Self Defense Force General Mashita for numerous reasons including Mishima's obsession with "bushido," the way of the warrior, which is embodied within "Hagakure.".
The philosophy of Hagakure is typical of the unique blend of Zen and Confucianism that was prevalent during Edo Era (1600-1868) Japan. This particular social system was promulgated by the Tokugawa Shogunate because it added to the focus of Zen the Confucian emphasis on ancestor worship, which strengthened the status quo and the concept of feudal class systems.
Although Japan is becoming increasingly Westernized in recent times, the Tokugawa Shogunate's 268-year rule still has a strong subconscious impact on Japanese behaviour. So, to better understand the Japanese, it is useful to understand their socio-political history, though it is certainly true that most Japanese (esp. those under 30) have never heard of "Hagakure" or Yamamoto Tsunetomo.
In addition to the historical character sketch it paints of samurai during the Edo Era, there are some gems of Eastern philosophy to be mined from the book, including the idea that one must always focus on every moment of his life, so that he may not be found negligent. For as Yamamoto writes in Hagakure, "The end is important in all things." By this he means that if everything else goes well, the one bad thing that happens at the end of the day, so to speak, is what people will remember when they think about you.
For Yamamoto, however, "Hagakure" is the legacy he is remembered by.