Martin Scorsese is back onboard to direct “The Wolf of Wall Street,” with Leonardo DiCaprio to star in the long-gestating adaptation of Jordan Belfort’s memoir.

Project had been set up at Warner Bros. in May 2007 with Scorsese and DiCaprio attached a few months after “The Departed” won the Oscar for picture, but the much-in-demand director subsequently fell out. But Scorsese officially committed Wednesday to direct “The Wolf of Wall Street.”

Terence Winter (“The Sopranos,” “Boardwalk Empire”) remains aboard to write, with Alexandra Milchan, DiCaprio’s Appian Way banner and Scorsese producing.

The project will chronicle Belfort’s dramatic rise and fall on Wall Street, along with his hard-partying lifestyle and tumultuous personal life, which included drug addiction.

It’s unclear whether “Wolf” is still set up at Warner Bros., where Appian Way’s based. Financing details and a start date will be announced at Cannes in May.

Scorsese is currently in post- production on “Hugo Cabret” and his next film will be “Silence,” based on the book by Shusaku Endo about two 17th century Portuguese missionaries who return to Japan to minister to Christians, who have been outlawed. Benicio Del Toro is starring and Graham King produces.

Belfort was indicted in 1998 for securities fraud and money laundering and spent 22 months in federal prison. He’s been sober for almost 14 years and has become a motivational speakers and corporate trainer while also working with the Salvation Army and MaAfrika Tikkun.

“After almost four years in development, I can’t begin to tell you how thrilled I am to finally be working with Leo and Marty on this,” Belfort said Wednesday. “They’re the ultimate dream team, and it was definitely worth the wait.”

“Wolf” marks the fifth collaboration between DiCaprio and Scorsese, who also teamed on “Gangs of New York,” “Shutter Island,” “The Aviator” and “The Departed.”

DiCaprio’s currently shooting the J. Edgar Hoover biopic directed by Clint Eastwood.

Scorsese’s represented by WME and Rick Yorn. DiCaprio’s also repped by Yorn.