In June 1811, Governor John Langdon appointed Upham as one of his aides, with the rank of lieutenant colonel. Upham continued in business as a merchant until 1812, when, in anticipation of a war with Great Britain, he was commissioned as major of the 11th U.S. Infantry on March 12. In June he was appointed by the new Governor William Plumer to command the detachment of troops from New Hampshire ordered to garrison Fort McClary.