John McCain's capture and imprisonment began on October 26, 1967. He was flying his 23rd bombing mission over North Vietnam, when his A-4E Skyhawk was shot down by a missile over Hanoi. McCain fractured both arms and a leg, and then nearly drowned, when he parachuted into Truc Bach Lake in Hanoi. After he regained consciousness, a crowd attacked him, crushed his shoulder with a rifle butt, and bayoneted him.
 Lieutenant Commander McCain was then transported to Hanoi's main Hoa Lo Prison, nicknamed the "Hanoi Hilton".
Although McCain was badly wounded, his captors refused to treat his injuries, instead beating and interrogating him to get information, and he was given medical care only when the North Vietnamese discovered that his father was a top admiral.
 His status as a prisoner of war (POW) made the front pages of major newspapers.
McCain spent six weeks in the hospital while receiving marginal care. Now having lost 50 pounds (23 kg), in a chest cast, and with his hair turned white, McCain was sent to a different camp on the outskirts of Hanoi in December 1967, into a cell with two other Americans who did not expect him to live a week.
 In March 1968, McCain was put into solitary confinement, where he would remain for two years.
In mid–1968, McCain's father was named commander of all U.S. forces in the Vietnam theater, and McCain was offered early release.
 The North Vietnamese made that offer because they wanted to appear merciful for propaganda purposes, and also wanted to show other POWs that elites like McCain were willing to be treated preferentially. McCain turned down the offer of repatriation; he would only accept the offer if every man taken in before him was released as well.
In August 1968, a program of severe torture began on McCain. He was subjected to rope bindings and repeated beatings every two hours, at the same time as he was suffering from dysentery.
 Further injuries led to the beginning of a suicide attempt, which was stopped by guards. After four days, McCain made an anti-American propaganda "confession". He has always felt that his statement was dishonorable, but as he would later write, "I had learned what we all learned over there: Every man has his breaking point. I had reached mine."
 His injuries left him permanently incapable of raising his arms above his head. He subsequently received two to three beatings per week because of his continued refusal to sign additional statements. Other American POWs were similarly tortured and maltreated in order to extract "confessions" and propaganda statements.
McCain refused to meet with various anti-war groups seeking peace in Hanoi, wanting to give neither them nor the North Vietnamese a propaganda victory.
 From late 1969 onward, treatment of McCain and many of the other POWs became more tolerable, while McCain continued to be an active resister against the camp authorities
. McCain and other prisoners cheered the B-52 Stratofortress-led U.S. "Christmas Bombing" campaign of December 1972, which they viewed as a forceful measure to push North Vietnam to terms.
Altogether, McCain was held as a prisoner of war in North Vietnam for five and a half years. He was finally released from captivity on March 14, 1973.