This is the life that the samurai were committed to: the never ending readiness to give his life, for his overlord, or the Emperor, or for his country. The samurai's duty was to serve his master in peacetime and in war.
A very short summarization of the portion of Japanese history that led to development of "Bushido" the way of the Samurai
Summarized from Samurai Warriors by Stephen Turnbull.
The life style of the Samurai class developed over a number of centuries. There were good and bad leaders and followers. The good leaders adhered to high moral standards and ethics while others lived by varying lesser values and, as in most societies, you will find some who are totally unscrupulous rascals. One thought that is foreign to most Americans is the samurai warrior's "choice or fate" of their life which was often not their own. The basic translation of samurai is "one who serves". The samurai's life was for service to his overlord. The overlords were also samurai and their duty was to serve to the country and the Emperor or the Shogun (the military ruler or defacto ruler of the country). Over the centuries from around 600 AD to 1868 the Emperors were often figure heads and Japan was ruled by various warlords with intermittent Shoguns who would unify the country for a period of time and then power would revert back to warlords and there would be infighting. For some periods of military rule, even the Shogun was a figurehead front for someone who could control but could not hold the title. One of these warlord periods lasted for over 100 years. During that time there was a split in the families who were in line to become emperor and two lines claimed the throne. They set up rival empires with samurai who were fiercely loyal as leaders. The two sides fought back and forth, made and broke alliances. Old ruling families were brought down and new ruling families grew.
That period was ended when Ieyasu Tokugawa completed a unification of Japan that was started by two outstanding generals before him, Oda Nobunaga and Hideyoshi Toyotomi. The Tokugawa Shogunate (military government) started in 1599 with complete control coalescing around 1608 which lasted for just over 250 years. This military government became corrupt and lost power to the merchant class which became very wealthy and powerful during the long interval of peacetime. Another part that contributed to the end of that era was the lack of contact with the world outside of Japan. Once the military government was fully in place, Tokugawa ordered the deportation or killing of all foreigners and eliminated any Christianity or drove it deep underground. Technology outside of Japan advanced while the military government of Japan kept the country in a time capsule of 16th century feudalism and killed any foreigners who dared to enter Japan. I have discovered that the shock wave of advanced warfare technology, far beyond the military government's ability to defend against, started in Okinawa. Commodore Perry was in Okinawa well before his ships appeared in Tokyo Bay. Even though the Shogun knew the Americans were on the way, they had nothing that could stand against the big cannons that were developed during the American Civil War.
The 2004 movie, "The Last Samurai", with actor Tom Cruise, depicted the end of the Tokugawa Shogunate (with a very fictitious story line) and the restoration of power to Emperor Meigi in 1868. In that movie they demonstrated the principles that the Samurai lived by. In the special features portion of the DVD's, it was shown as the Bushido Code in seven principles. I feel they missed one which is displayed throughout the movie, so I am adding persistence to the list. The samurai would carry on despite powerful adversaries and hardships.
So the Eight primary principles of the Samurai are these:
Through intense training the samurai becomes quick and strong. He is not as other men. He develops a power that must be used for the good of all. He has compassion. He benevolently helps his fellow man at every opportunity. If an opportunity does not arise, he goes out of his way to find one.
For the samurai, having done some "thing" or said some "thing." He knows he owns that "thing". He is responsible for it, and all the consequences that follow. A samurai is immensely loyal to those in his care. To those he is responsible for, he remains fiercely true.
A samurai general, most esteemed by the Japanese, named Masashige Kusunoki served Emperor Go-Daigo. In 1321 Go-Daigo started to rule directly and opposed the Bakufu (military government) which had a figurehead shogun controlled by regents of the Hojo clan. Kusunoki carried on a guerrilla campaign after Go-Daigo was captured and exiled. Kusunoki escaped capture a number of times and kept fighting the Bakufu from a mountain fortress that was never taken. Go-Daigo escaped his exile and overcame the Bakufu with the help of a Bakufu general, Takauji Ashikaga, who had the Minamoto family lineage to become Shogun. After the war, Go-Daigo ruled directly and Takauji, who wanted to be Shogun, revolted. He was defeated for a time and took refuge on the southern islands. In 1336 Takauji returned north and Kusunoki was sent to fight a standup battle in a place that Kusunoki advised the Emperor was not a wise site. Go-Daigo did not listen and sent Kusunoki to that battle ground anyways. When Kusunoki saw his army being overrun and capture imminent he committed suicide.
Kusunoki is revered because he served the Emperor so faithfully. He escaped to continue the fight when the Emperor desired. He also fought and died when the Emperor sent him to take a stand.
Rise up above the masses of people who are afraid to act. Hiding like a turtle in a shell is not living at all. A samurai must have heroic courage. It is absolutely risky. It is dangerous. It is living life completely, fully, wonderfully. Heroic courage is not blind. It is intelligent and strong.
Kusunoki displayed this attribute over and over. He fought very intelligently against overwhelming odds.
When a samurai has said he will perform an action, it is as good as done. Nothing will stop him from completing what he has said he will do. He does not have to "Give his word." He does not have to "promise". Speaking and doing are the same action.
A true samurai has only one judge of honor, and this is himself. Decisions you make and how these decisions are carried out are a reflection of whom you truly are. You cannot hide from yourself. How you act becomes your reputation.
Samurai have no reason to be cruel. They do not need to prove their strength. A samurai is courteous even to his enemies. Without this outward show of respect, we are nothing more than animals.
Be acutely honest throughout your dealings with all people. Believe in justice, not from other people, but from yourself. To the true samurai, there are no shades of gray in the question of honesty and justice. There is a right way and a wrong way.
When a samurai says he will perform an action, he continues resolutely, even stubbornly despite difficulties and hardships. The samurai doggedly continues until he perseveres or dies trying. The spirit of never giving up, to continue indefinitely, is spread thoughout the lives of the Japanese people. What may appear to be giving up may only be a patient endurance period.
There is a famous story of "The 47 Ronin". These men were made masterless because their leader was forced to commit suicide as the punishment of very strict laws that he was tricked into breaking by a jealous noble. It took a number of years before this faithful group of warriors could exact revenge for the unfair sacrifice of their overlord. Then in obedience to the strict laws against revenge, they all took their own lives in a mass suicide. They never gave up until the guilty noble was ambushed and killed. They had to appear to give up so the antagonist would drop his guard.