Holmes was later a delegate to the Maine Constitutional Convention. Upon separation from Massachusetts and the admission of Maine as a state, he was elected to the United States Senate and served from June 13, 1820, to March 3, 1827. Holmes was again elected to the Senate to fill the vacancy caused by the resignation of Albion Parris, serving from January 15, 1829, to March 3, 1833. During the 17th Congress, Holmes served as chairman of the Committee on Finance (1821–1822); during the 21st Congress, Holmes was chairman of the Committee on Pensions.