Seven Pines (and the Seven Pines National Cemetery) are located in the unincorporated town of Sandston in Henrico County, Virginia. Cemetery records state the name is derived from for a group of seven pine trees planted within the national cemetery in 1869 near the intersection of the old Williamsburg-Richmond Stage Road and the Nine Mile Road, however, the name "Seven Pines" pre-dates the establishment of the cemetery. Earlier maps and records, especially those from the American Civil War, commonly refer to the location as "Seven Pines." Today, the surrounding area is still referred to as "Seven Pines" although the local township is Sandston.
During the Civil War, several major battles of the Peninsula Campaign in 1862 took place nearby, including the Seven Pines (as named in Confederate records; the name in Federal records was Fair Oaks), and the smaller engagements of Oak Grove, Golding's Farm, Allen's Farm, Savage's Station, and White Oak Swamp. The National Cemetery was established in 1866. Most of the interments are of Federal (Union) soldiers that were originally hastily buried on the Seven Pines battlefield in makeshift graves. The cemetery's 1.9 acres (0.77 ha) are located near the center of General George B. McClellan's second and main defense line of the May 31, 1862. To help facilitate visitation, an electricstreet railway was built to the site by a company formed in 1888. The railway has long since been removed and most visitors now park in the cemetery's driveway next to the caretaker's lodge.