Who knew Martin Scorsese was a Deadhead?

The Oscar-winning director is executive producing an upcoming Grateful Dead documentary timed with the band’s 50th anniversary, producers announced Thursday.

The 71-year-old is a longtime fan of the quintessential hippie band, his rep told Page Six.

“The Grateful Dead were more than just a band. They were their own planet, populated by millions of devoted fans,” the “Wolf of Wall Street” director said in a statement.

He added, “I’m very happy that this picture is being made and proud to be involved.”

Amir Bar-Lev is directing.