Just before Lieutenant General Ulysses S. Grant's Overland Campaign of 1864, III Corps was dissolved. First division became third division II Corps. Egan led his regiment in the Battle of the Wilderness. He became commander of a brigade during the Battle of Spotsylvania, after Brigadier General J. H. Hobart Ward was relieved for drunkenness on the night of May 12, 1864. His command was involved in a counterattack against the Confederates during the fighting at Harris Farm. Egan led the brigade at the Battle of North Anna, attacking Henagan's Redoubt. He also led it at the Battle of Cold Harbor. Egan was wounded during the Second Battle of Petersburg in June 1864, suffering slight paralysis as a result.