Matsudaira was born in Okudono as the eldest son and heir to Matsudaira Noritoshi. His father retired in March 1852. The following year, with the arrival of American Commodore Matthew C. Perry and his fleet, the Shogunate increased military preparations against possible foreign invasion. Matsudaira was appointed Second Assistant Director to the Shogunal military, a largely ceremonial position, but one which enabled him to train the peasants of his domain into a rudimentary military force along western lines. In 1860, he was appointed master of ceremonies for the annual pilgrimage to the grave of Tokugawa Ieyasu in Nikkō. In 1863, he became obangashira, and rose to the ranks of the wakadoshiyori later that year. Towards the end of the year, he shifted the seat of his domain from Okudono to Tanoguchi.. As Matsudaira was a proponent of western-style modernization of the military, he had his new castle built in the style of a western-style five-pointed star fort; this became Tatsuoka Castle. The domain was also called "Tatsuoka-han", after the location of the castle. Along with the Goryōkaku in Hakodate, Hokkaido, it is one of only two star forts in Japan. Matsudaira disagreed with Matsudaira Yoshinaga with regards to the question of ending the sakokunational isolation policy and was expelled from the ranks of the wakadoshiyori, but was recalled for his military expertise the following year, and reinstated. He further rose to the ranks of the rōju in June 1866, which enabled him to participate in negotiations between the Tokugawa Shogunate and the Imperial Court later that year. He also encouraged the Shogunate to hire French military advisors to help modernize its forces, and to expand on his concept of a peasant conscript army to supplement the traditional forces of the samurai warriors, along with taking steps to increase industrialization to increase Japan’s economic strength. However, before any of the steps to could take effect, the Boshin War of the Meiji Restoration began. Despite his nominal rank as a general of the Tokugawa armies, Matsudaira refused to take up arms against the Imperial armies and retired to his domain in Shinano to await the outcome. Arrested as a central figure in the Tokugawa government by Satchō Alliance leaders, Matsudaira was given a chance to prove his loyalty by leading a military force against the Ōuetsu Reppan Dōmei in northern Japan. After having accomplished this task, he was allowed to retain his position as daimyō of Tanoguchi. Matsudaira changed his name officially in July 1869, dropping the Matsudaira name due to its associations with the Tokugawa clan and reverting to his family’s former name of Ogyu. In 1871, with the abolition of the han system, Ogyu was confirmed as appointed governor of Tanoguchi, until it was merged into the new Nagano Prefecture. In 1873, he entered the Meiji government, and was assigned the task of researching the medals and decorations issued by foreign governments, and developing an award system which would be suitable for Japan. In 1884, under the new kazoku peerage system, he was elevated to the rank of viscount. The title was further raised to that of count in 1907. He was also active with Sano Tsunetani in the founding of the Hakuaisha, the predecessor of the Japanese Red Cross. In 1909, he was asked to become a member of the Privy Council. Ogyu died the following year, and was awarded the Order of the Rising Sun with Paulownia clusters posthumously.