When on May 31, 1862, Lee took command of the Army of Northern Virginia, Long assumed his military secretary position on Lee's staff. He served Lee through the Seven Days, Northern Virginia Campaign of August 1862, Antietam Campaign, Fredericksburg Campaign, the campaign culminating in the Battle of Chancellorsville, and the Gettysburg Campaign. Long was considered a valuable asset with "vigor and unfailing judgment".