Porter was born on July 14, 1827 in Black Rock, New York, the only son of Yale lawyer Peter Buell Porter, a military leader in the War of 1812 and United States Secretary of War from 1828 to 1829, and Letitia Breckinridge. Before his parents marriage, his mother was a widow as her first husband, whom she married in 1804, Alfred William Grayson, had died in 1810. Grayson, a graduate of Cambridge University, was the son of Senator William Grayson of Virginia. Through his mother's first marriage, Porter had a half-brother, John Breckinridge Grayson. His parents had one other child together, his sister, Elizabeth Lewis Porter. Porter graduated from Harvard, studied at Heidelberg and Berlin, and graduated from Harvard Law School in 1857. He also authored plays, poems, and essays.
On October 21, 1861, his half-brother, John, then a Confederatebrigadier general, died of pneumonia and tuberculosis, only three months after joining the Confederate Army. On July 7, 1862, he offered his services to Gov. Edwin D. Morgan and was appointed Colonel, in the Union Army, of the 129th New York State Volunteers, which was renamed the 8th New York Heavy Artillery Regiment on December 19, 1862 due to need for defenses surrounding the capital. His regiment, under Brig. Gen. Robert O. Tyler, was of a unit that generally guarded the forts around Washington, D.C. and participated in parades used to increase morale in the city in the time of war. However, they were also trained to be used as infantry if necessary. His reason for enlisting was reported in his eulogy printed in The New York Times, where Porter was purported to have said: On September 5, 1863, Porter was nominated for New York Secretary of State, but declined due to his dedication to the military campaign of Lt. Gen. Ulysses S. Grant, saying that his neighbors had entrusted him with the lives of their sons and he could not leave them while the war lasted. In May 1864, Porter was ordered by Grant to go to Virginia to join the fighting in the south. In May 1864, during a lull in the Battle of Spotsylvania, a rebel soldier fired several shots at Porter while disguised by a tree. His men saw faint white smoke from the tree and six men shot at the tree, shooting the soldier. The soldier turned out to be a Confederate Captain who had been a prisoner at Fort McHenry while Porter commanded it and few days earlier had paroled, but not exchanged. The soldier was badly wounded but stated that he had fired three times at Porter and hoped "to bring him down the next time," adding that "if I had killed him I should die satisfied." Porter reportedly restrained his men from attacking the culprit with their bayonets.
Battle of Cold Harbor
On June 3, 1864, during the Battle of Cold Harbor in Virginia, Brig. Gen. Tyler, who Porter's regiment reported to, was wounded. Tyler requested Porter take command of the division. Porter then led the charge, advancing a short distance, until he was shot through the neck. As reported in his eulogy, Porter "immediately rose and advanced again, but had moved only a few paces forward when he fell to rise no more". The following night, five of his men, Sgt. Le Roy Williams, Galen S. Hicks, John Duff, Walter Harwood, Samuel Traviss and John Heany, brought Porter's body, with six bullets still in him, through a rain storm back to the Union side. For his participation in recovering Col. Porter's body, Sgt. Williams was later awarded the Medal of Honor. Porter was carried to Baltimore, Maryland, met by a military escort, and carried to the St. Peter's Episcopal Church, and there placed in the chancel draped in the flag of his country. Chaplain Gilbert De La Matyr accompanied Porter's body back to Niagara Falls.
On November 9, 1859, Porter married Josephine Matilda Morris, a daughter of George Washington Morris, cousin of Charles Manigault Morris, and granddaughter of Lewis Morris and great-granddaughter of Lewis Morris of Morrisania. Josephine was born at Grove Plantation in South Carolina, but her father was born at the family seat, Morrisania, in Westchester County, New York. When her father died in 1834, Josephine was only three years old and her mother Maria Whaley Morris took over management of the plantation until Josephine's brother, George Washington Morris, Jr., took it over. George Jr. ran up huge debts and after his death in 1857, the house and 124 of the 136 slaves the family owned were auctioned in Charleston in January 1858. In November of the following year, Peter and Josephine were married, and moved a brand new house in Niagara Falls along with Porter's sister, Elizabeth Porter. Together, they were the parents of two children:
Letitia Porter, who died five months after Porter of diphtheria.
Porter's funeral was held at St. Peter's Episcopal Church, where he used to attend services when he lived in that city, led by Reverend Dr. Shelton, an Episcopal minister and the same that had given the same last rites to his father, his mother, and his wife. Following the funeral services at the church, his remains were carried to his final resting place in Oakwood Cemetery.