The new Meiji government defeated the forces of Shōgun Tokugawa Yoshinobu (mostly from the western domains of Satsuma and Chōshū) at the Battle of Toba–Fushimi, and afterwards divided into three armies to advance on the Shogun’s capital of Edo.
Makino Tadakuni, the daimyō of Nagaoka, in Echigo Province (modern day Niigata Prefecture) was a supporter of the Tokugawa shogunate, and refused to submit to the new government even after the fall of Edo Castle to the imperial armies.
With the assistance of two Prussian businessmen (the brothers Edward and Henry Schnell) as military advisors, he purchased two Gatling guns (only one other existed in Japan at the time), 2,000 French rifles, and various other armaments.
The Imperial army was intent on seizing Niigata harbour to facilitate the supply of weapons and troops in the campaign against Aizu and Shōnai, the two main centers of the revolt.
However, the attacking side also suffered serious losses, including its leader Kawai Tsugunosuke, who was wounded during the battle and later died of gangrene in Aizu.