In 1874, he transferred to the 6th Turkestan Infantry Battalion, with which he participated in two expeditions under General Alexander Konstantinovich Abramov in the Russian conquest of the Zarafshan Valley, during which he was awarded the Order of St. Anne (3rd degree with swords and bow) for bravery in combat.
At the start of the Russo-Turkish War (1877-1878), voluntarily enlisted in the Bulgarian Army and was wounded during the Battle of Shipka Pass.
At the start of the Russo-Japanese War of 1904–1905, he was stationed on the Yalu River under the command of General Mikhail Zasulich's 2nd Siberian Corps with orders prevent the Imperial Japanese Army from crossing into Manchuria.
In the subsequent Battle of Yalu River, his forces bore the brunt of the Japanese assault, and without adequate support from General Zasulich, were routed with heavy losses.
With the start of World War I, Kashtalinsky again came out of retirement, and was appointed commander of the Russian 28th Army Corps on September 26, 1914.