Origin of Samurai
Before Heian period, the army in Japan was modeled along with that of Chinese army and under the direct command of the emperor. Except for slaves, every able-bodied men had the duty of enlisting for the army. These men had to supply for himself and many men got lost or gave up returning and settled down on their way home. This was treated as a part of taxation and it can be substituted with other forms of tax such as bolts of cloth. These men were called Sakimori , lit. defender but they are not related to samurai.
In the early Heian, the late 8th and early 9th centuries, the emperor Kammu sought to consolidate and expand his rule in northern Honshu. The armies sent to conquer the rebellious Emishi lacked motivation and discipline and were unable to prevail. He then introduced the title of Seiitaishogun or shogun and began to rely on the powerful regional clans to conquer the Emishi.
Skilled in mounted combat and archery, these clan warriors became the emperor's preferred tool for putting down rebellions.
During the Heian period, the emperor's army was disbanded and the emperor's power gradually declined. While the emperor was still the ruler, powerful clans around Kyoto assumed positions of ministers and their kins bought their positions of magistrates to collect taxes. To repay their debts and amass wealth, they often imposed heavy taxes and many farmers were forced to leave their lands. Regional clans grew powerful by offering lower taxes to their subjects as well as freedom from conscription. These clans armed themselves to repell other clans and magistrates from collecting taxes. They would eventually form themselves into armed parties and became samurai.
The name of samurai came from guards of the imperial palace and private guards clans...