Jordan Belfort wrote the first draft of "Wolf Of Wall Street" in prison as bunkmate Tommy Chong was also writing a book. Getty Images Entertainment/ Rob Kim As most now know, Jordan Belfort is the real-life swindler on which Martin Scorsese's "The Wolf Of Wall Street" is based.

The Oscar-nominated film is based on the book that Belfort wrote after being released from prison in 2006.

But in a new interview with The Hollywood Reporter, Belfort reveals that the only reason he sat down to write his memoir in the first place was because of his unlikely prison bunkmate, Tommy Chong of "Cheech and Chong."

While Belfort served 22 months in prison in Taft, Calif., for fraud and money laundering, Chong was at the same time serving a nine-month sentence for selling drug paraphernalia.

Belfort explains their unlikely meeting to THR:

When I arrived at Taft, they lost my paperwork, so I spent five days in solitary. It was brutal, absolutely brutal. But it was minimum security, and after solitary it was like a boys' club -- and who's my bunkmate? Tommy Chong from Cheech & Chong. I couldn't believe it.

He was in the process of writing his book. We used to tell each other stories at night, and I had him rolling hysterically on the floor. The third night he goes, "You've got to write a book." So I started writing, and I knew it was bad. It was terrible. I was about to call it quits and then I went into the prison library and stumbled upon The Bonfire of the Vanities by Tom Wolfe, and I was like, "That's how I want to write!"

"We had a nice little hierarchy there, intelligent famous guys hanging out together,” Tommy Chong says of his time in prison with Jordan Belfort. Michael Buckner/Getty

Chong has said of his time with Belfort, “We had these beautiful vegetarian, healthy meals every night, and Jordan was part of the gang. We had a nice little hierarchy there, intelligent famous guys hanging out together,” adding that Belfort’s arrival “was like Elvis coming to jail."

But despite plenty of writing time on his hands, Belfort struggled to express himself in the way that he wanted.

When you're in jail, you have a lot of time to think about your mistakes. It was completely mellow. I played tennis three hours a day, and I'd write for maybe 12. I wrote about 130 pages, but I tore them up. I just didn't think they were good enough.

It wasn't until after Belfort left prison, in 2006, that he really got serious about his writing process.

I got out of jail and said, "Maybe I should try to write again." I had zeroed out financially. I was 43 years old. I knew this book agent, Joel Gotler, and he said, "Send me some pages and I'll call you next week." The next morning my phone rings and he says, "Who the f--- wrote these pages?!"

... I was a very slow writer, still am. I started writing and didn't leave the house. My only human contact was my children and my ex-wife. She wasn't vindictive at all [unlike her portrayal in the movie].

It took me about 11 months [to finish the book], seven days a week, 15 hours a day -- my whole life I've been an unbelievable insomniac, and I sleep maybe three or four hours a night. When I got a solid 125 pages, Random House snapped up the book for $500,000 upfront.

Despite million-dollar movie deals being offered his way, Belfort eventually chose the cheaper $330,000 deal that would allow Martin Scorsese and Leonardo DiCaprio to tell his story. It would only take seven years to actually make the film.

Since its Christmas Day release, "The Wolf Of Wall Street" has raked in $338 million at the global box office and is up for five awards at Sunday's Academy Awards.

Check out Belfort talking "Wolf Of Wall Street" in his Hermosa Beach home in this THR exclusive video: