In 1862, Yōshichirō, now known as Shigeyoshi (重栄) or more commonly, Ōkura (大蔵), accompanied Aizu daimyō Matsudaira Katamori to Kyōto when the latter was appointed to the post of Kyoto Shugoshoku.
In 1866 Yamakawa was allowed to accompany the Shogunate's Foreign Affairs Magistrate Koide Hidezane to Imperial Russia, where he assisted in negotiations concerning the drawing of international borders in Karafuto.
In the early months of 1868, Yamakawa was involved in the restructuring of Aizu Domain's military, and was made commander of the reorganized artillery corps (the Hōheitai 砲兵隊),[1] replacing the veteran Hayashi Gonsuke, who had died from wounds sustained at Battle of Toba–Fushimi.
In order to shore up the domain's financial situation (which had been in dire straits for over a decade), he brought the skilled engravers Katō Munechika and Akichika, as well as others, to Aizu, and built a smelter inside Tsuruga Castle, casting the three denominations of 1 bun, 2 bun, and 1 ryō coins.
Putting together a “lion dance troupe” from the nearby Komatsu village, he set up a “tōri-hayashi” (Japanese “marching band”), and managed to get every one of his soldiers into the castle safely, past the nose of the besieging army.
As vice-governor of Tonami, he struggled with the impossible situation the exiles from Aizu faced, with severe weather and lack of food and shelter.
After the abolition of the Han system in 1871, he remained to serve the government in Aomori Prefecture for a short time, but later in 1871 resigned and at the recommendation of Imperial Japanese Army Major General Tani Tateki.
Promoted to lieutenant colonel, he was in combat against Saigo Takamori in the 1877 Satsuma Rebellion as a staff officer of the 2nd Independent Brigade.