The Boshin War (戊辰戦争, 1868-1869) was fought between the Tokugawa Shogunate and the pro-Japanese Emperor in Japan. The defeat of the Shogunate lead directly to the Meiji Restoration.

Discontent between the Shogunate and the reformist sonno joi movement had been brewing for years. In November 1866, Emperor Meiji had given the rebellious provinces of Satsuma and Choshu the right to overthrow the Shogunate; however, reigning Shogun Tokugawa Yoshinobu deftly sidestepped this by resigning his post (but not his power) the next day.

Events came to a head on January 3, 1868 when the Emperor declared his own restoration to full power, and the war started 7 days later when Shogun Tokugawa Yoshinobu declared the declaration 'illegal' and attacked Kyoto, the seat of the Emperor. Despite a 3:1 numerical advantage, the first significant battle near Toba and Fushimi led to a rout of the 15,000-strong Shogunate forces, and Yoshinobu was forced to flee to Edo. Saigo Takamori led the victorious Imperial forces north and east through Japan, eventually leading to the unconditional surrender of Edo in May 1868.

After Yoshinobu's surrended most of Japan accepted the Emperor's rule, but a core of Shogunate supporters led by the Aizu clan continued the resistance. After a protracted month-long battle, Aizu finally admitted defeat on September 23, leading to the mass suicide of the Byakkotai (White Tiger Corps) young warriors. A month later, Edo was renamed Tokyo, and the Meiji Era started.

In a final chapter to the war, Navy official Enomoto Takeaki had fled to Hokkaido with the remnants of the Shogun's navy and attempted to establish a new state there, but this too was crushed by Meiji forces in June 1869, bringing the war to an end.