When fighting broke out in the Battle of Toba-Fushimi on January 27, 1868, over 60 Nagaoka soldiers were stationed to protect Tamatsu bridge near Osaka Castle.
Moreover, being influenced by the Monroe Doctrine from the United States, Kawai began to advocate a stance of armed neutrality for the domain from both the shogunate and imperial forces.
This was seen as a problem, and when Edo Castle fell on May 4 of the same year, imperial troops immediately advanced towards northern Echigo province, part of which was controlled by the domain.
Soon after, Takakura Nagasachi, a court noble, was appointed to lead the imperial forces that were to pacify the Hokuriku region and subjugate Aizu Domain in nearby Mutsu province.
Sensing a counterattack, Kawai devised another strategy and on September 10, a month later, 17 platoons numbering about 680 soldiers were ferried across Hatchōoki in six hours and, upon arriving at the other side, staged a surprise attack at Nagaoka Castle.
The soldiers immediately attacked, reaching so far as the land around the fortifications, repelling imperial forces led by Yamagata Aritomo, and recaptured the castle.