Born to a mid-ranking retainer family in Nagaoka Domain, Echigo Province, he studied Yangming Confucianism and practical statecraft under Yamada Hokoku of Matsuyama Domain in Bitchu. Returning to his domain he pushed forward administrative reforms, working to rebuild the domain's finances, strengthen its military, and organize Western-style artillery units. When the Boshin War broke out in 1868, Kawai aimed to maintain the domain's independence by advocating 'armed neutrality'—refusing to side with either the Satchō imperial forces or the old shogunate. He attempted direct negotiations with the new government but was refused, and was ultimately forced to fight alongside the old shogunate forces. Using Gatling guns and modern fire tactics, he mounted a desperate resistance centered on Nagaoka Castle. Though the castle was once taken from him, he recaptured it in a miraculous counterattack, but in the end it fell again. While retreating he was struck by a bullet and died of his wounds at Shiozawa. He was forty-one. Known by the pen name Soryukutsu, he is deeply beloved in Echigo as a heroic man of chivalry. His life was depicted in Shiba Ryotaro's novel 'Toge' (The Pass), through which he became widely known to later generations.