After Mexico, Archer moved to Texas in 1848, and was wounded there in a duel
with Andrew
Porter, where his "second" in the duel was Thomas J.
Jackson.[1]
Returning to Maryland, Archer resumed his law practice, but decided
in 1855 to join the regular army as a captain
in the 9th U.S. Infantry, with whom he served primarily in the Pacific
Northwest. Archer never married.

He was promoted to brigadier general on June 3, 1862, and
initially given command of three regiments from Tennessee, after the
brigade commander, Robert H. Hatton, had been killed at
Seven Pines. Later in June, Archer's brigade joined five others to
form the "Light Division" under Maj. Gen.A.P.
Hill. Soon, two more regiments were added to Archer's brigade,
which fought well in the Seven Days Battles, at Cedar Mountain, and at Second Bull Run, where his
horse was killed under him. His men dubbed him "The Little
Gamecock" for his slight build and fierce attitude in combat.

During the 1863 Gettysburg Campaign, Archer's
health continued to deteriorate as a result of long marches in the
summer heat and humidity. His brigade was now part of the division of Maj. Gen. Henry Heth. Arriving at
Gettysburg on July 1, Archer's troops were engaged with Federal
cavalry under John
Buford for over two hours, before being counterattacked by
rapidly arriving Union infantry, including the famed Iron Brigade.
Archer's men were likely those who killed Union commander Maj. Gen.
John F.
Reynolds (the exact cause of Reynolds' death is controversial),
but were quickly pushed back across Willoughby Run, where the
exhausted Archer took cover in a thicket. A Union soldier, Private
Patrick Maloney of the 2nd Wisconsin, seized Archer and escorted
him behind enemy lines, where he briefly met an old colleague,
Union Maj. Gen. Abner Doubleday. Archer became the
first general officer to be taken captive from the Army of Northern
Virginia since General Lee assumed command. Birkett D. Fry
assumed command of Archer's Brigade and led it during Pickett's
Charge, while Archer and his younger brother and aide-de-camp Robert
Harris Archer (1820‚Äď1878) were sent to Fort Delaware for prisoner
processing.

Archer, along with many other officers captured at Gettysburg,
was eventually sent to the Johnson's Islandprisoner of war camp on the coast of Lake Erie, where his health
rapidly declined due to exposure to the inclement Ohio weather. He wrote a letter to the Confederate
War Department in which he advocated a plot to overthrow the
guards, but the conspirators would require assistance from the
government to get the men back home.

After a stay of nearly a year, he was sent, along with 600
officers from various prisons, to Fort Delaware, in accordance with
a scheme to reship them to Morris Island in South Carolina, a
place under constant fire from Confederate cannon. Archer and the
others would be hostages to prevent further shelling. This plan
never materialized.