 William Kellogg served as a member of the Illinois House of Representatives in 1849 and 1850.He then served as a judge of the Illinois tenth circuit court from 1850 to 1852.Kellogg was elected as a Republican to the Thirty-fifth, Thirty-sixth, and Thirty-seventh Congresses (March 4, 1857–March 3, 1863).