Through his wife's McLean family ties (the chief justice of the U. S. Supreme Court was a relative), Slough went to Washington, D.C., where he was given command of a brigade in the Shenandoah Valley during Stonewall Jackson's Valley Campaign of 1862. His forces were stationed at Harpers Ferry and saw little action. He was appointed brigadier general of volunteers of August 25, 1862, and became the military governor of Alexandria, Virginia. For the rest of the war, he commanded the District of Alexandria. In December 1862, he sat on the court-martial that convicted Maj. Gen. Fitz John Porter of disobedience and misconduct.