The three-time Formula One world champion said he put the director in touch with the King of Jordan – who helped him film in Petra.
Spielberg desperately wanted permission to shoot the finale of the 1989 hit Indiana Jones And The Last Crusade at the famous archaeological site, but he was refused permission.
Sir Jackie, 81, revealed the anecdote to Princess Anne during a video call to raise awareness for his charity Race Against Dementia.
He said Spielberg and the film’s stars Harrison Ford and Sir Sean Connery were participating in a charity clay pigeon shooting event he hosted in Gleneagles.
Sir Jackie said Spielberg looked distracted as they chatted: “He starts looking over my shoulder and I’m like, ‘What have I done to deserve this?
“And all of a sudden he said ‘excuse me, but that looks like King Hussein of Jordan over there’, and I said ‘yes that’s who it is.’
Spielberg explained his dilemma, with Sir Jackie playing the go-between to resolve the issue.
He said to Princess Anne: “I said ‘maybe you should talk to her majesty’ so I put them together – bingo – he got her permission and it was a very happy chappie. ”
The Treasury, one of Petra’s best-known sites, ended up representing the temple housing the Holy Grail in famous scenes from the film.
Anne and Sir Jackie have been close friends for many years and his wife Lady Helen, 77, is the godmother of Zara Tindall, the princess’ daughter.
It was Lady Helen’s diagnosis of dementia six years ago that led her husband to start his charity.
It aims to use the technologies, innovation and problem-solving ethos of Formula 1 to research disease.
He has already raised millions to fund a network of researchers who are integrating the advancements of McLaren F1, Red Bull Racing and Dyson in their work aimed at a better understanding of the disease.
Princess Anne’s conversation with Sir Jackie was part of Memories – a series of conversations to support the charity.
In the coming months, he will star with Prince Albert of Monaco, tennis legend Rod Laver, Pink Floyd drummer Nick Mason and opera singer Dame Kiri Te Kanawa.
Speaking after the video call, Sir Jackie said: “I have been fortunate to have a great career and my wife Helen was by my side during it all.
“We should have been able to share these memories forever, but dementia steals that.
“Without urgent progress, one in three people born today will suffer from dementia, which is unacceptable.
“I passionately believe that the way Formula 1 uses advanced technologies and innovative thinking to achieve remarkable developments at a high speed, can help scientists create a real and much-needed breakthrough in dementia research.