Tokugawa Ieyasu, victor of the Battle of Sekigahara, established a feudal government (Edo Shogunate) with Edo (Tokyo) as the base, in 1603. He then takes control of his vassals with force. He strengthens his control of vassals by issuing laws such as the Ikkoku Ichijo Rei (Law of One Castle per Province) and the Buke shohatto (Laws for the Military Houses) after incapacitating the Toyotomi clan at the Siege of Osaka in 1615.
However, it was not rare that citizens suffering under the rule of force took up arms and revolted against their lords. Furthermore, crime rates rose as the number of ronin (masterless samurai) rose due to the shogunate prosecuting their masters, and anti-shogunate incidents start to occur.
To remedy this, the Shogunate set out to convert the samurai to refined culture and verticality. He wanted to be a protective Shogunate for the population, especially during natural disasters and famines. It was the Pax Tokugawa.
As a response to this, the shogunate reconsidered the value of samurai families held until then, and requested them to maintain the balance of the hierarchy by valuing courtesy rather than resulting to violence. The nation (bakufu) begins to protect its people after overcoming multiple natural disasters and cases of famine. From this came a period of peace also known as Pax Tokugawa.
However, the shogunate, which had only been trading with a limited number of countries, will be conflicted after receiving pressure from western countries requesting the regime to open its borders. The shogunate complies in order to avoid war, but efforts to overthrow the weak shogunate (Tobaku) and expel the foreign intruders gain traction among bushi who are discontent with this decision. 15th Shogun Tokugawa Yoshinobu, cornered by those on the side of overthrowing the shogunate, relinquished his political power to the Imperial Court (Taisei Hokan) from fear of inner conflict in 1867. However, fearing that Yoshinobu will regain his power, members of the Tobaku side caused a coup d’état, took control of the Imperial Court, and announced the establishment of a new government (Declaration of Imperial Rule). At the same time, Yoshinobu’s resignation as Minister of the Interior and the abandonment of the Shogunate’s territories was decided (Jikan Nochi). As a result, a war between the former Shogunate army and the new government army (Battle of Toba–Fushimi) took place, and lasted until the former Shogunate army surrendered at the Goryokaku Fortress in Hakodate (Boshin War).