The 40th Virginia completed its organization in May 1861. Its members were recruited in Northumberland, Richmond, and Lancaster counties. After serving in the Aquia District, the unit was assigned to General Field's, Heth's, and H.H. Walker's Brigade, Army of Northern Virginia. It participated in the campaigns of the army from the Seven Days' Battles to Cold Harbor, then was involved in the Petersburg siege north of the James River and the Appomattox Campaign.
It sustained 180 casualties during the Seven Days' Battles which was about half its effective force. The unit lost 4 wounded at Cedar Mountain, had 14 killed and 73 wounded at Chancellorsville, and of the 253 engaged at Gettysburg more than twenty percent were disabled. Many were captured at Sayler's Creek and only 7 men were included in the surrender on April 9, 1865.
The Reverend Wayland Fuller Dunaway recorded a stanza of the song he heard while imprisoned at the Union prison on Johnson's Island, Ohio. Dunaway had been a captain in Co. I, 40th Virginia Infantry, when captured during the Battle of Falling Waters in July 1863. His stanza:
But now we are in prison and likely long to stay,
The Yankees they are guarding us, no hope to get away;
Our rations they are scanty, 'tis cold enough to freeze,—
I wish I was in Georgia, eating goober peas.
Peas, peas, peas, peas,
Eating goober peas;
I wish I was in Georgia, eating goober peas.
FIELD OFFICERS:
Colonel John M. Brockenbrough; Lieutenant Colonels Fleet W. Cox, Arthur S. Cunningham, and Henry H. Walker; and Majors Edward T. Stakes and William T. Taliaferro.
ASSIGNMENTS:
General Field's, Heth's, and H.H. Walker's Brigade, Army of Northern Virginia.
BATTLES:
Seven Days' Battles
Battle of Cedar Mountain
Second Battle of Mannassas
Battle of Sharpsburg
Battle of Fredericksburg
Battle of Chancellorsville
Battle of Gettysburg
Battle of Cold Harbor
Siege of Petersburg
Battle of Sayler's Creek
Appomattox Campaign
ROSTERS:
The rosters of this unit contains the names of 1789 men.
Company A Northumberland County
Company B Richmond and Lancaster County
Company C Northumberland County
Company D (Farmer's Fork Grays) several counties
Company E several counties
Company F several counties
Company G Northumberland County
Company H Lancaster County
Company I Lancaster County
Company K (Capt. Fleet W. Cox) - Northumberland County