He was the son of Robert Ogden, a lawyer and public official, and Phebe (Hatfield) Ogden. Robert was politically prominent, serving as the speaker of the New Jersey Assembly on the eve of the American Revolution. The family had deep roots in New Jersey: John Ogden had built a house in Elizabeth in 1664 after having moved from Long Island, where he had settled in 1640 from Hampshire, England. Matthias attended the College of New Jersey (now Princeton University) as did his younger brother, Aaron Ogden. His sister Rhoda was married to Aaron Burr's uncle, Timothy Edwards. Burr and Matthias grew up together in the Edwards household and attended Princeton together.
After the outbreak of hostilities between the American colonists and the British authorities in 1775, Ogden went along as a gentleman-volunteer on Benedict Arnold's march to Quebec, joined by his step brother Aaron Burr, and was wounded in the assault on that city on December 31, 1775. John Trumbull depicted Ogden in his painting commemorating the Battle of Quebec (1775) and the death of General Richard Montgomery, however Ogden was not actually present at Montgomery's death, having been wounded earlier. His cousin Aaron Burr was present, but Ogden is in-accurately depicted in his place. Ogden's journal account of the expedition is in the Lloyd W. Smith collection of Morristown National Historical Park.
Ogden was named lieutenant colonel of the First New Jersey Battalion in March 1776, serving under Colonel William Winds. At the age of 22, he became colonel of the newly reorganized 1st New Jersey Regiment on January 1, 1777 after Silas Newcomb resigned the position. Ogden was captured by the British at Elizabethtown in November 1780. He was released by exchange. In September 1781, he conceived of a plan to capture Prince William Henry (later King William IV). The plan received Washington's approval and was to be effected in March 1782, but had to be abandoned. Ogden was granted a leave by Congress in April 1783 to visit Europe in order to secure business relations with the French. While there, he was awarded the honor le droit du tabouret by King Louis XVI. Ogden brought back news of the Treaty of Paris upon his return to America. He was breveted brigadier general by Congress in September 1783 and was described by one historian as a "brave and gallant soldier".
Colonel Ogden's leadership role is featured prominently in "An American Crisis: George Washington and the Dangerous Two Years after Yorktown, 1781-1783" by William M. Fowler (2011).
He was once court martialed. Isaac Morrison testified.
After the war, Ogden served as member of the state's legislative council (1785). He was one of the agents entrusted with the minting of new state coinage for New Jersey, the famed "Jersey horsehead" pennies. The coins, which depicted a horse's head and plow, symbols taken from the coat of arms/Seal of New Jersey, on one side, and a "Union" shield taken from the Great Seal of the United States, on the reverse, were produced in a number of locations. Ogden operated his mint in Elizabethtown. In the 1789 presidential election, Ogden served as an elector for New Jersey.
Ogden was married to Hannah Dayton, a daughter of Elias Dayton. They had a son, Francis Barber Ogden (1783-1857), who was named after fellow Jersey Continental officer and in-law, Francis Barber, who was married to Matthias' sister, Mary.
Ogden died of yellow fever in Elizabethtown on March 31, 1791 at the age of 36.