Stockdale was born in Abingdon, Illinois. During World War II, He was appointed to the Naval Academy, where he graduated in 1946. Shortly thereafter, Stockdale reported to Pensacola, Florida for flight training.
In 1954, Stockdale was accepted into the Test Pilot School at Patuxent River, Maryland. Among his classmates there was John Glenn.
On a mission over North Vietnam on September 9, 1965, Stockdale ejected from his A-4E Skyhawk, which had been disabled from anti-aircraft fire. Stockdale parachuted into a small village where he was severely beaten and taken into custody.
He was held as a prisoner of war in the Hoa Lo prison for the next seven years. Locked in leg irons in a bath stall, he was routinely tortured and beaten. When told by his captors that he was to be paraded in public, Stockdale slit his scalp with a razor and beat himself in the face with a stool. His captors did not dare show him in public that way. When Stockdale heard that other prisoners were dying under the torture, he slit his wrists and told them that he preferred death to submission.
Stockdale was released as a prisoner of war in 1973. He received the Medal of Honor in 1976.