Yashiro was born in Gakuden Village, Owari Province, as the third son of a village headman, Matsuyama Shoichi. The Matsuyama claimed descent from a retainer of the medieval pro-Imperial hero Kusunoki Masashige, and as a youth Yashiro joined a cadet movement of pro-Sonnō jōi militia of Owari Domain and despite his young age, fought in the Boshin War. He was adopted in 1868 by Yashiro Ippei, a samurai retainer of Mito Domain, whose surname he took. His adopted father saw that he was enrolled in the han school and subsequently Yashiro graduated from the 8th class of the Imperial Japanese Naval Academy in 1881, ranked 19th of his class of 35 cadets, and excelled at navigation and surveying. After midshipman service in the ironclad warship, he served as a crewman on the corvette. He was the posted to various administrative assignments within the Imperial Japanese Naval Academy. From July 1890 to November 1892, he was sent as a naval attaché to Vladivostok, in Russia. After his return to Japan, he was assigned to the cruiser, and was serving as a division officer aboard that vessel during the Battle of the Yalu on 17 September 1894 in the First Sino-Japanese War. Yashiro briefly served on the cruiser during the next year, before being assigned as a naval attaché to Saint Petersburg, Russia, where his principal duty was making an Intelligence assessment of the capabilities of the Imperial Russian Navy. Promoted to lieutenant commander in 1896 and commander the following year, Yashiro served on the Imperial Japanese Navy General Staff between 1899 and 1900. In early 1900, he was appointed the executive officer on the cruiser, and in June 1900, he received his first command: the cruiser, followed by the in October 1901. Following his graduation from the Naval Staff College, Yashiro was promoted to captain in 1901. Commander of the armored cruiser during the Russo-Japanese War, Yashiro earned a reputation as a cool-headed and intelligent battle commander in skirmishes against the Russian cruiser and the gunboat in the Battle of Chemulpo Bay on 9 February 1904. Yashiro developed the plan to blockade the entrance to Port Arhur by sinking obsolete ships: however, he was overruled in his desire to lead the attack in person by Admiral Tōgō Heihachirō. The intimately unsuccessful operation was led by Takeo Hirose, and Yashiro was so overcome with remorse that he later personally sponsored the education of any children who had been orphaned in the operation. During the war, also participated in the Battle of the Yellow Sea and the Battle of Tsushima. At the war's end, Yashiro was assigned to Berlin, Germany as naval attaché until December 1907, when he was promoted to rear admiral. In December 1908, he was commander of the Yokosuka Reserve Fleet, and became commander of the IJN 1st Fleet from December 1909, Training Fleet from July 1910, and IJN 2nd Fleet from March 1911. In December 1911, he became commandant of the Naval Staff College. During his time at the Naval Staff College, Yashiro was a strong proponent of introducing karate into the Navy's training program. In September 1913, he was transferred to become commandant of the Maizuru Naval District.
Minister of the Navy
Following the Siemens-Vickers scandals, Yashiro replaced Saitō Makoto as Navy Minister in the cabinet of Prime MinisterŌkuma Shigenobu. Yashiro was a surprising choice, as he was far down on the seniority list, but the Maizuru Naval District was completely free from any taint of the Siemens Scandal. World War I began almost immediately after he assumed office. The opportunities for Japan to use the Anglo-Japanese Alliance as an excuse to enter the war and to expel Germany from Asia, seizing its possessions in the Shantung Peninsula and in the islands of the South Pacific were clear, but Yashiro was at best ambivalent, knowing how these actions would create a larger conflict with the United States. Although appointed due to his commendable military and apolitical record, Yashiro's bluntness over issues with the Navy's budget led to his forced resignation in April 1915. In December, he was sent back as commander of the IJN 2nd Fleet. Yashiro was ennobled with the title of danshaku under the kazoku peerage system in July 1916. From December 1917, he was commander of the Sasebo Naval District. Raised to the rank of full admiral in July 1918, he became a member of the Supreme War Council in December 1918. Yashiro was placed on the reserve list in August 1920 and lived in retirement from January 1930 until his death six months later in June 1930.