June 23, 2022 | 11:19am

Brad Pitt was duped into searching for buried treasure in his own backyard.

The “Once Upon a Time in … Hollywood” star revealed in his GQ magazine August 2022 cover story that a man once convinced him that one of the previous owners of his French chateau stole millions of dollars’ worth of gold during the medieval times and buried it in the estate.

“I got obsessed,” Pitt, 58, confessed. “Like for a year, this was all I could think about, just the excitement of it all.”

The Oklahoma native suggested perhaps his upbringing played a part in his enthusiasm.

“Maybe it has something to do with where I grew up, because in the Ozark Mountains there were always stories of hidden caches of gold,” he said.

However, after a year of searching, Pitt found no treasure and discovered that the man who told him about it was seeking investment in some sort of a radar company.

The “Moneyball” star called the experience “pretty foolish in the end,” but concluded, “It was just the hunt that was exciting.”

An aerial shot of Brad Pitt's French estate.
Pitt bought the estate with ex Angelina Jolie in 2008 for $28.4 million.
AFP via Getty Images

Pitt’s French estate, however, has brought him good fortune: its vineyard is one of the world’s top producers of rosé wine, which has turned into a multimillion-dollar business.

But Château Miraval has also brought the “Fury” star some aggravation recently.

Pitt sued his ex-wife Angelina Jolie in February after she sold her stake of the property, which the “Troy” star claims the “Maleficent” star did “illegally.”

Brad Pitt and Angelina Jolie posing together at an event.
Pitt and Jolie got married at the estate in 2014.
WireImage

“Jolie consummated the purported sale without Pitt’s knowledge, denying Pitt the consent right she owed him and the right of first refusal her business entity owed his,” the lawsuit alleged.

“She sold her interest with the knowledge and intention that [Russian businessman Yuri] Shefler and his affiliates would seek to control the business to which Pitt had devoted himself and to undermine Pitt’s investment in Miraval.”

Earlier this month, Pitt demanded a trial by jury for the ongoing case.