Thomas was born in New Castle, Delaware. He graduated from the United States Military Academy in 1823, and was commissioned a second lieutenant in the 4th U.S. Infantry. He fought in the Seminole War in Florida and, during the Mexican–American War, he was the chief of staff to General William O. Butler. He received a brevet promotion to lieutenant colonel for Monterrey, which was made permanent in 1852. From 1853 to 1861, he served as chief of staff to the commanding general of the U.S. Army, Winfield Scott.