After the revolution
Later in 1783 Armstrong returned home to Carlisle and became an Original Member of the Pennsylvania Society of the Cincinnati. He was named the Adjutant General of Pennsylvania's militia and also served as Secretary of the Commonwealth of Pennsylvania under Presidents Dickinson and Franklin. In 1784, he led a military force of four hundred militiamen into a controversy with Connecticut settlers in the Wyoming Valley of Pennsylvania. His tactics enraged the nearby states of Vermont and Connecticut, which sent their own militia into the area. Timothy Pickering was dispatched to forge a solution to the difficulty, and the settlers were able to keep title to the land they had tamed. In 1787 and 1788 Armstrong was sent as a delegate for Pennsylvania to the Congress of the Confederation. The Congress offered to make him chief justice of the Northwest Territory. He declined this, as well as all other public offices for the next dozen years.
Armstrong resumed public life after the resignation of John Laurance as U.S. Senator from New York. As a Jeffersonian Republican he was elected in November 1800 to a term ending in March 1801. He took his seat on November 6, and was re-elected on January 27 for a full term (1801–1807), but resigned on February 5, 1802. DeWitt Clinton was elected to fill the vacancy, but resigned in 1803, and Armstrong was appointed temporarily to his old seat.
In February 1804, Armstrong was elected again to the U.S. Senate to fill the vacancy caused by the resignation of Theodorus Bailey, thus moving from the Class 3 to the Class 1 seat on February 25, but served only four months before President Jefferson appointed him U.S. Minister to France.
To Paris Armstrong brought as his private secretary the United-Irish exile, David Bailie Warden. After serving as Consul, Warden was to author the first major work of reference for the diplomatic corps; a "pioneering" contribution to "the emergence of doctrinal views and a specialist literature on international law".
Armstrong served as Minister in Paris until September 1810. In 1806 he had also briefly also represented the United States at the court of Spain.
When the War of 1812 broke out, Armstrong was called to military service. He was commissioned as a Brigadier General, and placed in charge of the defenses for the port of New York. Then in 1813 President Madison named him Secretary of War. He was barely confirmed by the Senate with 18-15 votes.
Henry Adams wrote of him:
In spite of Armstrong's services, abilities, and experience, something in his character always created distrust. He had every advantage of education, social and political connection, ability and self-confidence; he was only fifty-four years old, which was also the age of Monroe; but he suffered from the reputation of indolence and intrigue. So strong was the prejudice against him that he obtained only eighteen votes against fifteen in the Senate on his confirmation; and while the two senators from Virginia did not vote at all, the two from Kentucky voted in the negative. Under such circumstances, nothing but military success of the first order could secure a fair field for Monroe's rival.
Armstrong made a number of valuable changes to the armed forces but was so convinced that the British would not attack Washington D.C. that he did nothing to defend the city even when it became clear it was the objective of the invasion force. After the American defeat at the Battle of Bladensburg and the subsequent burning of Washington, Madison, usually a forgiving man, forced him to resign in September 1814.