in 1837, dayton was elected to the new jersey legislative council, and he became an associate judge of the new jersey supreme court in 1838. following the death of u.s. senator samuel l. southard, he was appointed to the united states senate starting july 2, 1842, and elected to finish the term ending in 1845. he was re-elected by the new jersey legislature as a whig in 1845 but lost in 1851, ending his service on march 3, 1851.