A B-52 US Air Force bomber carrying two bombs on a routine flight went into an uncontrolled spin over North Carolina on 23 January 1961.
As the plane was breaking apart, a control inside the cockpit released the two Mark 39 hydrogen bombs over Goldsboro that could have killed millions of people in the country.
Journalist Eric Schlosser who obtained the document under the Freedom of Information Act said an explosion would have "changed literally the course of history".
One of the bombs fell to the ground unarmed. But the second "assumed it was being deliberately released over an enemy target - and went through all its arming mechanisms save one, and very nearly detonated over North Carolina," Schlosser added in a television interview.
Only the failure of a single low-voltage switch prevented disaster, he said.
The bomb was almost 260 times more powerful than the bombs US dropped on Hiroshima and Nagasaki killing 166,000 and 80,000 civilians respectively.
The US government has acknowledged the accident before, but declined to comment publicly on how close the bomb came to detonating.
The newly declassified document was written eight years after the incident by US government scientist Parker Jones - who was responsible for mechanical safety of nuclear devices.
"One simple dynamo-technology low voltage switch stood between the United States and a major catastrophe," he wrote.
There has been no official comment to the newly declassified details.
RA/HH