Born in South Kingstown, Rhode Island, he was the younger brother of Oliver Hazard Perry. Matthew Perry obtained a midshipman's commission in the Navy in 1809, and was initially assigned to the USS Revenge, which was under the command of his elder brother.
Perry's early career saw him assigned to several different ships, including the President, where he was aide to Commodore John Rodgers, which was in a victorious engagement over a British vessel, HMS Little Belt, shortly before the War of 1812 was officially declared. During that war Perry was transferred to the United States, and consequently saw little fighting in that war afterward since the ship was trapped at New London, Connecticut. After the war he served on various vessels in the Mediterranean and Africa (notably aboard the USS Cyane during its patrol off Liberia in 1819-20), sent to suppress piracy and the slave trade in the West indies. Later during this period, while in port in Russia, Perry was offered a commission in the Russian navy, which he declined.
Perry commanded the USS Shark from 1821-25, and from 1826-27 acted as fleet captain for Commodore Rodgers. Perry returned for shore duty to Charleston, South Carolina in 1828, and in 1830 took command of USS Concord. He spent the years of 1833-37 as second officer of the New York Navy Yard (later the Brooklyn Navy Yard), gaining promotion to captain at the end of this tour.
He had a considerable interest in naval education, supporting an apprentice system to train new seamen, and helped establish the curriculum for the United States Naval Academy. Additionally, he was a vocal proponent of modernization of the Navy. Once promoted to captain, he oversaw construction of the Navy's second steam frigate, the USS Fulton, which he commanded after its completion. He organized America's first corps of naval engineers, and conducted the first U.S. naval gunnery school while commanding the Fulton in 1839-40 off the coast off Sandy Hook, New Jersey.
Perry acquired the courtesy title of commodore in 1841, and was made chief of the New York Navy Yard in the same year. In 1843 he took command of the African Squadron, whose duty was to interdict the slave trade under the Webster-Ashburton Treaty, and continued in this endeavor through 1844.
During the Mexican-American War Perry was in charge of the Gulf Fleet, and commanded the force that captured Frontera, Tabasco and Laguna in 1846. In 1847 the forces under Perry's command supported the siege of Veracruz.
In 1852 Perry embarked from Norfolk, Virginia for Japan, in command of a squadron in search of a Japanese trade treaty. Aboard a black-hulled steam frigate, he ported four ships at Uraga Harbor near Edo (modern Tokyo) on July 8, 1853, and was met by representatives of the Tokugawa Shogunate who told him to proceed to Nagasaki, where there was limited trade with the Netherlands and which was the only Japanese port open to foreigners at that time. Insulted, Perry refused to leave and demanded permission to present a letter from President Fillmore, threatening force if he was denied. Perry proceeded ashore at Kurihama (near present Yokosuka) on July 14, presented the letter to delegates present and left for the China coast, promising to return for a reply. He returned in February 1854 with twice as many ships, finding that the delegates had prepared a treaty embodying virtually all the demands in Fillmore's letter. Perry signed the document on March 31, 1854 and departed, mistakenly believing the agreement had been made with imperial representatives.
Upon Perry's return to the United States in 1855, Congress voted to grant him a reward of $20,000 in appreciation of his work in Japan. Perry used part of this money to prepare and publish a report on the expedition in three volumes, titled Narrative of the Expedition of an American Squadron to the China Seas and Japan. He died three years later in New York City. His remains were removed to the Island Cemetery in Newport, Rhode Island in 1866.
Perry's middle name is often misspelled as Galbraith.
See also: History of Japan