In April 1861, Early entered the Confederate Army as colonel of the 24th Virginia Infantry. He led them into service at the Battle of First Manassas, and soon after, he received a promotion to brigadier general. He remained with the Army of Northern Virginia, and, as such, was involved in all their major engagements from 1862 to 1864. He held the position of commander during several battles in which he was in charge of a detachment. In January 1863, he was promoted to major general. He served with distinction during the Battle of Second Fredericksburg, and afterward, during the Gettysburg campaign. After the retreat from Gettysburg, he temporarily took command of the II corps during the Battle of Wilderness, and as such, received his next promotion: lieutenant general. He was ordered to the Shenandoah Valley, and as he drove the Union forces westward, he moved north to threaten Washington in July 1864. At the Battle of Monocacy, he was forced to retreat from the field, and in September, he was defeated at the Battle of Winchester, and at Fisher's Hill. At the subsequent Battle of Cedar Creek, he was defeated once more. He was finally forced to surrender his forces in March 1865.