After unsuccessfully standing for the United States Senate in 1878, he returned to the Maryland House of Delegates, and later resumed the practice of law.
[6] From 1851 to 1853, he was Comptroller of Maryland and then collector of the port of Baltimore from 1853 to 1860, and United States Commissioner of Patents for a fragment of that year (February through December).
[7] Thomas was appointed United States Secretary of the Treasury in the Presidential Cabinet of President James Buchanan and served from December 12, 1860 until his resignation on January 14, 1861.
There was little faith in the stability of the country due to the threat of secession by the Southern United States, and war appeared inevitable.
Following Interior Secretary Jacob Thompson, Thomas resigned after only a month in response to his failure to obtain the loan.
[11] As his reason for resignation on January 11, 1861, Thomas cited "the purpose of the Cabinet and President to enforce the collection of the customs in the port of Charleston.