After the war, Ogden studied law and was admitted to the bar in 1784. He commenced practice in Elizabeth and served as a presidential elector in the 1796 electoral college that elected John Adams. He was clerk of Essex County from 1785–1803, and was elected as a Federalist to the United States Senate to fill the vacancy caused by the resignation of James Schureman and served from February 28, 1801 to March 3, 1803. He lost his bid for reelection to the Senate in 1802.