 Foster was elected to the Georgia House of Representatives in 1822 and was reelected through 1825.In 1828, he won election to the 23rd United States Congress as a Jacksonian and served two additional terms before losing his reelection bid in 1834.He moved to Columbus, Georgia, the following year.