The Boshin Civil War (戊辰戦争 Boshin Sensō) was a series of battles that led to the overthrow of the Tokugawa shogunate and the restoration of the imperial rule in Japan. It began with the Battle of Toba-Fushimi (鳥羽・伏見の戦い Toba-Fushimi no Tatakai) on January 27, 1868 (Keiō 4.1.3, a year designated boshin, dragon, in the sexagenary cycle) and ended with the Battle of Hakodate (函館戦争 Hakodate Sensō) on June 27, 1869 (Meiji 2.5.18).
By 1867, it was clear that the shogunate could no longer hold out against the pro-imperial forces led by the Satsuma and Chōshū domains. The shōgun Tokugawa Yoshinobu was willing to relinquish a measure of his authority only on condition that the shogunate retained political primacy. In November 1867, he nevertheless agreed to accept a compromise proposed by the Tosa Domain (土佐藩), according to which he would return political authority to the emperor and head a council of daimyō. By that time, however, Satsuma and Chōshū had decided to overthrow the shogunate by force, and on January 3, 1868, their troops seized the imperial palace in Kyōto and proclaimed an imperial restoration (王政復古 ōsei fukko).
Yoshinobu withdrew to Ōsaka Castle, but some of his vassals were unwilling to submit, and shogunate troops from the castle engaged in pitched battle with imperial forces at Toba and Fushimi, just south of Kyōto. The better-organised imperial forces, although outnumbered, trounced to shogunal forces, and Yoshinobu quietly set sail for Edo. Imperial forces under the command of Prince Arisugawa Taruhito (有栖川宮熾仁親王 Arisugawa-no-Miya Taruhito-Shinnō, 1835–1895) then advanced toward Edo, but under an agreement reached between Saigō Takamori of Satsuma and Katsu Kaishū, a Tokugawa retainer, the city surrendered without resistance.
Yoshinobu was ordered into domiciliary confinement in Mito (modern-day Ibaraki Prefecture), but the resistance from shogunal forces persisted. About 2,000 shogunate troops, the so-called shōgitai (彰義隊), gathered at a temple in the Ueno district of Edo but were crushed by the troops of the Chōshū military leader Ōmura Masujirō (大村益次郎, 1824-1869). Domains in northern Honshū formed a league, the Northern Alliance (奥羽越列藩同盟 Ōuetsu Reppan Dōmei) under the leadership of the collateral Aizu Domain (会津藩), but these too finally surrendered on November 6, 1868, after the Battle of Aizu, which had lasted since late summer. The ninth-generation daimyō of Aizu, Matsudaira Katamori, had been holding the office of the Kyoto Protector (京都守護職 Kyōto Shugoshoku), deploying a large contingent of Aizu troops in Kyōto. After the fall of Tsuruga Castle in October 1868, twenty members of the Byakkotai (白虎隊, “White Tiger Brigade”), an Aizu unit of teenage samurai, committed suicide, because they believed their lord and their families had perished.
A final centre of resistance was Ezo (modern-day Hokkaidō), where Enomoto Takeaki had fled with his French military advisers on eight shogunate warships and proclaimed a republic. After massive attack he surrendered in June 1869. With the conclusion of hostilities, the entire country came under the control of the pro-imperial government, although the problem of paying for the war, despite significant contributions from Mitsui and other merchant houses, persisted for some years.
The Boshin War has been described either as a conflict between the bourgeoisie and an absolute shogunate, as a conflict between two absolute powers (the shogunate and the forces that would later establish the Meiji government), or as a struggle between absolutism and the forces striving to share power between the emperor, the shōgun, and the daimyō.