After the start of the Civil War, Porter became chief of staff and assistant adjutant general for the Department of Pennsylvania, but he was soon promoted to colonel of the 15th Infantry on May 14, 1861. In August, he was promoted to brigadier general of volunteers, backdated to May 17th so he would be senior enough to receive divisional command in the Army of the Potomac, newly formed under Maj. Gen. George B. McClellan. Soon Porter became a trusted adviser and loyal friend to McClellan, but his association with the soon-to-be-controversial commanding general would prove to be disastrous for Porter's military career.
Porter led his division at the beginning of the Peninsula Campaign, seeing action at the Siege of Yorktown. McClellan created two provisional corps and Porter was assigned to command the V Corps. During the Seven Days Battles, and particularly at the Battle of Gaines' Mill, he displayed a talent for defensive fighting. At the Battle of Malvern Hill, Porter also played a leading role. For his successful performance on the Peninsula, he was promoted to major general of volunteers on July 4, 1862.
Second Bull Run
August 29, noon; Longstreet's Corps arrives; Porter's Corps stops and does not engage Porter's corps was sent to reinforce Maj. Gen. John Pope in the Northern Virginia Campaign, a reassignment that he openly challenged and complained about, criticizing Pope personally. During the Second Battle of Bull Run, on August 29, 1862, he was ordered to attack the flank and rear of Maj. Gen. Thomas J. "Stonewall" Jackson's wing of the Army of Northern Virginia. Porter had stopped at Dawkin's Branch, where he had encountered Maj. Gen. J.E.B. Stuart's cavalry screen. On August 29 he received a message from Pope directing him to attack the Confederate right (which Pope assumed to be Jackson on Stony Ridge), but at the same time to maintain contact with the neighboring division under Maj. Gen. John F. Reynolds, a conflict in orders that could not be resolved. Pope was apparently unaware that Confederate Maj. Gen. James Longstreet's wing of the army had arrived on the battlefield; the proposed envelopment of Jackson's position would have collided suicidaly with Longstreet's large force. Porter chose not to make the attack because of the intelligence he had received that Longstreet was to his immediate front.
On August 30 Pope again ordered the flank attack, and Porter reluctantly complied. As the V Corps turned to head towards Jackson's right and attacked, it presented its own (and consequently the entire army's) flank to Longstreet's waiting men. About 30,000 Confederates assailed Porter's 5,000 or so men, driving through them and into the rest of Pope's forces, doing exactly what Porter most feared would come of these orders. Pope was infuriated by the defeat, accused Porter of insubordination, and relieved him of his command on September 5.
Porter was soon restored to command of the corps by McClellan and led it through the Maryland Campaign, where the corps served in a reserve position during the Battle of Antietam. He is said to have told McClellan, "Remember, General, I command the last reserve of the last Army of the Republic." McClellan took his implied advice and failed to commit his reserves into a battle that might have been won if he had used his forces aggressively.
On November 25, 1862, Porter was arrested and court-martialed for his actions at Second Bull Run. By this time, McClellan had been relieved by President Abraham Lincoln and could not provide political cover for his protégé. Porter's association with the disgraced McClellan and his open criticism of Pope were significant reasons for his conviction at court-martial. Porter was found guilty on January 10, 1863, of disobedience and misconduct, and he was dismissed from the Army on January 21, 1863.
Later life and death
After the war ended, Porter was offered a command in the Egyptian Army but declined it. He spent most of the remainder of his public life fighting against the perceived injustice of his court-martial.
In 1878, a special commission under General John M. Schofield exonerated Porter by finding that his reluctance to attack Longstreet probably saved Pope's Army of Virginia from an even greater defeat. Eight years later, President Chester A. Arthur commuted Porter's sentence and a special act of the U.S. Congress restored Porter's commission as an infantry colonel in the U.S. Army, backdated to May 14, 1861, but without any back pay due. Two days later, August 7, 1886, Porter, seeing vindication, voluntarily retired from the Army.
Porter was involved in mining, construction, and commerce. He was appointed as the New York City Commissioner of Public Works, the New York City Police Commissioner, and the New York City Fire Commissioner. He died in Morristown, New Jersey, and is buried in Green-Wood Cemetery, Brooklyn, New York. His grave can be found in Section 54, Lot 5685/89.
On December 27, 1894, Porter, along with 18 others, founded the Military and Naval Order of the United States, which was soon renamed the Military Order of Foreign Wars. Porter's name was at the top of the list of signers of the original institution and received the first insignia issued by the Order.