Dwayne “The Rock” Johnson is going back to his beginnings for his latest project.

Fox has nabbed a hot comedy from the wrestler-turned-superstar and producer Will Ferrell, inspired by the real life experiences of Johnson and former WWE head writer Brian Gewirtz, Variety has learned.

The project, hailing from Johnson’s Seven Bucks Productions and Ferrell’s Gary Sanchez Productions, received a put pilot commitment at Fox. Andrew Gurland, who created FX’s “Married,” will write the pilot script.

The series offers a behind-the-scenes look at a fictional professional wrestling outfit and chronicles the one-of-a-kind odd couple relationship that develops between a charismatic young character, like the The Rock, and a painfully awkward comedy writer new to the world of wrestling. A fish-out-of-water among all of these alpha males, this beta former sitcom writer needs as much help as he can get navigating the extremely passionate, sometimes crazy and always unpredictable world of professional wrestling.

“This November will mark the 20th anniversary of my professional wrestling debut,” said Johnson. “I was 24 years old, putting in the hard work, making $40 bucks per match and had no clue of the long journey that lay ahead of me with characters and backstage stories so colorful you’d think there’s no way that can be true. The entertaining show that goes on in front of the crowd pales in comparison to the insanely entertaining show that goes on backstage. Brian and myself can’t wait to tell our stories.”

Gewirtz added: “Coming from Hollywood to the wrestling industry, with its intense backstage atmosphere and larger than life personalities, was a major culture shock. After working in the business for over 15 years, Dwayne and I had encounters and experiences that were unbelievable as well as unforgettable. We can’t wait to bring this project to the fans.”

Along with Johnson and Gewirtz, exec producers on the single-cam, hourlong comedy are Dany Garcia of Seven Bucks Prods., Ferrell and his Gary Sanchez Prods. producing partner Adam McKay, plus Kevin Messick. 20th Century Fox Television is the studio.

“This has been a longtime passion project and we’re thrilled to be jumping into the network comedic space on a topic we love and know so well. Fox, Gary Sanchez Productions and Andrew Gurland are the perfect partners to help us bring this story to life,” commented Garcia, one of Variety’s Power of Women honorees this year.

“Ferrell and I met in the wrestling ring so doing this show with Dwayne Johnson brings us full circle,” said McKay. “And there’s no one more talented (or limber) than Andrew Gurland to steer this project.”

Gurland noted, “I’ve always gravitated towards comedy that comes from a real place, which is why I jumped at the opportunity to work with Dwayne and Brian. Their stories about the real drama behind pro-wrestling’s larger than life spectacle are hilarious and surprisingly poignant. I hope I do them justice.”

The project is the latest for Johnson, who’s one of Hollywood’s most in-demand stars — both on-camera and behind the screen. His HBO series “Ballers” was recently renewed for a third season, plus he broke out onto the digital scene with his new YouTube channel. Among his films coming up are the latest “Fast & Furious” flick “Fast 8,” “Rampage,” the “Baywatch” reboot, the sequel to box-office hit “San Andreas,” Disney’s animated “Moana” and the “Jumanji” reboot, which he’s currently filming in Hawaii.

For Seven Bucks Prods., the wrestling comedy is the latest television project on the bustling company’s slate. USA Network is developing a “Muscle Beach” series and Seven Bucks is currently behind “Ballers,” HBO’s “Rock and a Hard Place,” CNN’s “Soundtracks: Songs That Made History” and Spike TV’s “Rock the Troops.” On the film side, Seven Bucks is adapting Sony’s “Son of Shaolin,” and is behind the upcoming “Baywatch,” “Shazam” and more.

Johnson, Gurland and McKay are all repped by WME. Ferrell is with UTA.