After the outbreak of the Russo-Japanese War of 1904–1905, both Leonid and his brother Nikolai were participating in the events. Nikolai served on the Russian Navy's cruiser "Gromoboi" based with the Russian Pacific Fleet at Vladivostok, while Leonid, with the rank of captain, was a battery commander in the 4th East Siberian Rifle Artillery Brigade based at Port Arthur. At the Battle of Jinzhou, Leonid Gobyato, together with General Roman Kondratenko, for the first time applied indirect fire from closed firing positions in the field using a protractor. In July 1904, he was seriously wounded in the thigh in combat, and was assigned to be assistant chief of artillery of the Port Arthur fortress. During the Siege of Port Arthur, the fighting revealed the need for a weapon to attack the Japanese in closely spaced trenches, gullies and ravines. Together with Russian navy midshipman S. Vlasov, he modified small naval mines with stabilizers be fired from a wheeled 47-mm naval mortar. For services in the defense of Port Arthur was awarded five medals (among them the Order of St. George (4th degree) and the Golden Sword "for courage". After the surrender of the garrison of Port Arthur on January 2, 1905, Gobyato was made a prisoner of war.