His grandfather and namesake, John Pegram, had been a major general, commanding all Virginia forces during the War of 1812. His father, James Pegram, was a prominent attorney, militia brigadier general, and bank president in Richmond.
However, in October 1844, James Pegram was killed in a steamboat accident on the Ohio River, leaving a widow, who had to open a girls' school to support her five children. One of John Pegram's younger brothers was the future Confederate artillerist William Ransom Johnson Pegram. His great grandmother's half-brother was North Carolina senator Nathaniel Macon. Pegram was appointed to the United States Military Academy in 1850. He graduated four years later, ranking tenth in his class, which also included future generals J.
Pegram was commissioned as a second lieutenant and assigned to the dragoons. He served at a variety of garrisons and outposts in the West. In January 1857, he was appointed Assistant Instructor of Cavalry at West Point.
Pegram was granted a leave of absence in 185859 to travel to Europe to observe the Austro-Sardinian War. Returning home, he was assigned in 1860 to duty on the frontier in the New Mexico Territory. In early July 1861, he accepted a commission as a lieutenant colonel and was assigned command of the 20th Virginia Infantry. His regiment was part of the brigade of Brig. Garnett and served in western Virginia fighting Union troops under Maj.
On July 11, 1861, cut off from Garnett's main body during the Battle of Rich Mountain, Pegram controversially surrendered his entire regiment to the Federals. Thus John Pegram became the first former U.Army officer to be captured while in Confederate service.  His men were paroled, but Pegram was imprisoned for six months in Fort Warren in Boston harbor. There, he met prominent socialite Hetty Cary, who became his fianceé. When finally exchanged, Pegram was promoted to colonel and became the Chief Engineer of the army of General Pierre G. Beauregard and then to Braxton Bragg. Within a short time, he was assigned as Chief of Staff for Maj. Edmund Kirby Smith and served in the Kentucky Campaign. Pegram was promoted to brigadier general in November 1862 and given command of a cavalry brigade. His performance before the Battle of Stones River in December was criticized by his superiors for failing to provide proper intelligence on enemy movements. In March 1863, he led an ill-fated raid into Kentucky that was defeated at the Battle of Somerset and drew criticism from his subordinate officers, including John Hunt Morgan.  He remained in command, however, and was ordered to report to the Army of Northern Virginia in October after he requested reassignment back to the Eastern Theater. However, before leaving, Pegram and his division fought under Nathan Bedford Forrest at the Battle of Chickamauga. Pegram was given command of a veteran Virginia infantry brigade in the division of Jubal A.
In May, Pegram was wounded at the Battle of the Wilderness and went home to recuperate. Returning to field duty that fall, he served with distinction during Early's independent Valley Campaign as a division commander. On January 19, 1865, Pegram married Hetty Cary in a well-attended ceremony in St. Paul's Church in Richmond. Among the celebrants was Confederate President Jefferson Davis and his wife, Varina.
Less than three weeks later, Pegram was killed in action during the Battle of Hatcher's Run. His funeral was held in the same church where he had recently been married, with many of the same attendees. His younger brother William would be killed in some of the war's last fighting at the Battle of Five Forks in April. Pegram was buried in Richmond's Hollywood Cemetery. In MacKinlay Kantor's 1961 alternate history book "If the South Had Won the Civil War", Pegram appears as one of several prominent people who would have campaigned for the Abolition of Slavery in an independent Confederacy and eventually achieved it by 1885.The item "Carte de Visite Civil War Confederate General John Pegram KIA" is in sale since Saturday, July 31, 2021. This item is in the category "Collectibles\Militaria\Civil War (1861-65)\Original Period Items\Photographs". The seller is "civil_war_photos" and is located in Midland, Michigan. This item can be shipped worldwide.