Nathan Gardier, 24, admitting having a firearm and ammunition in a public place and being in charge of a vehicle while above the legal alcohol limit.
Snaresbrook Crown Court heard he fell asleep at traffic lights in east London while carrying the 9mm pistol earlier this month.
He was jailed for five-and-a-half years and given a year's driving ban.
The court heard Gardier, of Falmer Road, Walthamstow, believed it was "probably fate" he was arrested with the pistol on nearby Willow Walk on 4 August and "must be something God has put in my path for a reason".
His barrister, Mohammed Bashir, told the court his client had found the weapon in a field, but Recorder Sally Hales QC said that was "utterly implausible".
Sentencing him, she said she had to impose a strong term as a deterrent "because of the dangers such weapons can do".
"In your case the harm that you presented was worse because the firearm was loaded, ready to be fired, with a bullet in the chamber," she said.
A drunk driver who fell asleep in traffic with a loaded gun resting on his lap has been jailed.