In his work for the Engineers, Trapier helped in the construction of defenses on the coastline of the United States. He also served in the Mexican–American War from 1846–1848,[2] and he would resign his commission on February 28, 1848.[2] After tendering his resignation, Trapier moved back to his plantation in South Carolina and became a planter.[2] He also was active in the South Carolina State Militia, rising to the rank of colonel and serving as the militia's aide-de-camp.[1] As the chief of ordnance of South Carolina, Trapier "ensured that the state was well-armed."[2]