When Minnesota was admitted to the Union, Armstrong moved to Yankton, Dakota Territory, then a small Native American village. He was a member of the first Territorial House of Representatives in 1861, was reelected in 1862 and 1863, and served as speaker in 1863. He became editor of the Dakota Union newspaper in 1864, and was appointed clerk of the territorial Supreme Court in 1865. He was elected to the territorial council in 1866 and in 1867, and served as the council's president.
In 1867, Armstrong acted as secretary of the Indian peace commission in Dakota Territory. Continuing as a surveyor, he established the great meridian and standard lines for United States surveys in southern Dakota and in the northern Red River Valley. He was again elected to the Territorial council in 1869. In 1870 he was elected as a Democrat to the United States House of Representatives; he was reelected in 1872, and served from March 4, 1871 to March 3, 1875.