Promoted to major in 1903, Shirakawa returned to command the IJA 21st Infantry Regiment during the Russo-Japanese War. During the war, he was transferred to the staff of the IJA 13th Division. This division was given the independent assignment of occupying Sakhalin before the conclusion of the Portsmouth Treaty, landing on Sakhalin on 7 July 1905, only three months after being formed, and securing the island by 1 August 1905. As a result of its successful operation, Japan was awarded southern Karafuto during the Portsmouth Treaty, one of Japan's few territorial gains during the war. After the war, Shirakawa was assigned to the Personnel Bureau of the Army Ministry from October 1905. He was promoted to lieutenant colonel in 1907, colonel in 1909, and commander of the IJA 34th Infantry Regiment.