Why did the Shogun lose in the Boshin War?

by sickjuicy

Both sides of the war were partially modernizing, having access to the latest firearms and foreign help. So it wasn't exactly a fight between modern vs primitive as some people seem to think it was (thanks to The Last Samurai). What were the factors favoring an Imperial victory?

ParallelPain

/u/NientedeNada gave a good breakdown on the quality of forces and the political/diplomatic challenges facing the ex-Bakufu forces at Toba-Fushimi (the outbreak of hostilities and the first and only major engagement of the war) here. A couple things to add is that due to some political maneuvers prior, the ex-Bakufu had to move their forces out of Kyoto, and now they had to fight their way back in. The streets of the city acted as chokes and prevented the ex-Bakufu forces from utilizing their 3:1 numerical advantage, and the New-Government forces had the local high grounds. This allowed the fighting to proceed as a stalemate, but in favour of the New-Government forces, with the ex-Bakufu forces unable to break through. In the middle of fighting, the imperial court threw its lot behind the New-Government forces, naming Prince Komatsu Akihito as commander and allowing the New-Government forces to fly the Emperor's battle flag, which must have greatly boosted the morale of the New-Government troops and sunk the morale of the ex-Bakufu troops. At the same time (perhaps due to this), previously Imperial-leaning-but-neutral Tosa Domain (iirc while they were with the New Government they were still hoping for a peaceful solution up till this point) committed its troops to the New-Government causes and the ex-Bakufu was pushed back. They tried to regroup at Yodo castle, but Yodo domain had decided to switch sides, and would not open the castle gates, forcing the ex-Bakufu to abandon the field in defeat and retreat back to Osaka.

From here on it was basically due to the personal decision of the ex-Shogun Tokugawa Yoshinobu. He decided to abandon first Osaka, and then just as quickly gave himself up. This also caused Edo to give up without a fight. While there's no guarantee of victory had Yoshinobu decide to fight on, his decision not to fight meant there was no hope of reviving the Bakufu, and no rallying point for any Bakufu supporters, and added further legitimacy to the cause of the New Government (not like they need any more). The rest of the war basically consisted of the New Government chasing a small number of stubborn resistors all the way to Hokkaido.