Gems from the Crown Jewels were stored in a biscuit tin in Windsor Castle during the Second World War, according to a BBC documentary due to be screened at 8pm on Sunday.
The stones were taken to the Berkshire property by officials fearful of a Nazi invasion.
The BBC One programme about the Crown Jewels and the Queen's coronation reveals for the first time how the artefacts were stored in a deep hole following orders from King George VI.
The gems, including the Black Prince's Ruby from the Imperial State Crown, were hidden in the tin and buried under a sally port - a secret exit from the castle used in times of emergency.
The Queen, who spent much of the war at Windsor, knew the general story but did not know the details until told by royal commentator Alastair Bruce, who presents the documentary.
"What was so lovely was that the Queen had no knowledge of it. Telling her seemed strangely odd," Bruce told the Times newspaper.
He also said how "an electric set of letters" from Sir Owen Morshead, the royal librarian, to Queen Mary, the mother of George VI, shed light on the mystery.
Sir Owen's documents describe how a hole was dug in chalk earth, which had to be covered to hide it from enemy bombers, and two chambers with steel doors created.
A trap door used to access the secret area where the tin box was kept still exists today.
In the documentary, the Queen also talks about the quirks of being head of state - from the perils of wearing a heavy crown, to her robes sticking to a thick carpet pile.
The Queen speaks candidly about her own coronation, joking that you cannot look down when wearing the Imperial State Crown, as your neck would "break."
She also recounts how she was brought to a standstill when her robes ran against the carpet pile in Westminster Abbey during her coronation.
Looking at the crown, the Queen said: "Fortunately, my father and I have about the same sort of shaped head. But once you put it on, it stays. I mean, it just remains on."
Bruce said the head has to be kept still when wearing it and the Queen agreed: "Yes. And you can't look down to read the speech, you have to take the speech up. Because if you did your neck would break, it would fall off.
"So there are some disadvantages to crowns, but otherwise they're quite important things."
The crown was made for George VI's coronation in 1937 and is set with 2,868 diamonds including 17 sapphires, 11 emeralds and hundreds of pearls, including four known as Queen Elizabeth I's earrings.
It also features a gemstone known as the Black Prince's Ruby, believed to have been worn by Henry V in his helmet at the Battle of Agincourt in 1415.
The documentary features footage of the Queen walking through the Abbey, and shows how her coronation dress was embroidered in silk with pearls, and gold and silver bullion thread.
"Well, I remember one moment when I was going against the pile of the carpet and I couldn't move at all," the Queen said.
Bruce said: "Really?" and the monarch replied: "Yes, they hadn't thought of that."
The documentary is part of the Royal Collection Season, a major partnership between the BBC and Royal Collection Trust.