Hastings was elected as a Federalist to the Seventh Congress to fill the vacancy caused by the resignation of Levi Lincoln. He was reelected to the Eighth and Ninth Congresses and served from August 24, 1801, to March 3, 1807. He declined to be a candidate for renomination in 1806 and was a member of the Massachusetts State Senate in 1810 and 1814. From 1819 to 1828, he was chief justice of the court of sessions for Worcester County. Hastings died in Mendon; interment was in the Old Cemetery.
Legacy
Hastings' son, William Soden Hastings, also represented Massachusetts in the House of Representatives.
Buckminster, Lydia N. H., The Hastings Memorial, A Genealogical Account of the Descendants of Thomas Hastings of Watertown, Mass. from 1634 to 1864, Boston: Samuel G. Drake Publisher (an undated NEHGS photoduplicate of the 1866 edition).