King was elected as a Whig to Congress, succeeding fellow Whig Dudley S. Gregory, the former mayor of Jersey City. He served alongside his older brother John in office from March 4, 1849 to March 3, 1851, but declined to be a candidate for renomination in 1850 and was succeeded by Democrat Rodman M. Price (who later served as the 17th Governor of New Jersey after leaving Congress in 1853). While in Congress, he was a member of the Committee of Commerce, and he opposed the repeal of the Missouri Compromise and the Fugitive Slave Act of 1850.