Lil Wayne is releasing a memoir he inked while incarcerated at Rikers Island that includes details of him performing a gay marriage ceremony for two other inmates and finding out his girlfriend had slept with Drake.

The rapper, whose real name is Dwayne Carter Jr., is releasing “Gone ’Til November” on Oct. 11, a handwritten journal that describes his eight-month stint at Rikers in 2010 for gun charges.

He describes how he playfully married off two other male inmates, and they decorated the hall with toilet tissue and toasted with 13 bottles of Gatorade. He wrote, “Gatorade is liquid gold in this bitch . . . Imagine seeing grown-ass men in jail hanging tissue for wedding decorations. AND one of them is Lil Wayne. Crazy.”

To pass time, Wayne watched “American Idol,” but when it came to “The Wendy Williams Show,” he said he’d rather return back to his cell. He admits he missed sex, but early in his stay two female officers were suspended for coming to see him. “Maybe there will be some female groupies in this bitch after all,” he wrote.

He requested one girlfriend visit without wearing panties so she could “do a ‘Basic Instinct.’ ” But they got caught because “they have extensive-ass searches before you come in here, so they made her put on a pair of boxers because they knew she didn’t have on panties. Damn!”

Wayne got visits from P. Diddy and Kanye West, all of whom underwent the body searches, but he admitted a low point was when Drake admitted to sleeping with his girlfriend in the past, “Finding out that she [bleeped] Drake was the absolute worst thing I could have found out. Drizzy came to see me, he was like, ‘Yeah, it’s true’. Damn! This is the type of [bleep] a man never wants to find out while he is locked up.”

While incarcerated, Wayne wrote on a daily basis and emerged with a new album. “I always thought I needed things like being high with my n - - gas, a Bugatti, a dope-ass crib or some big-booty bitches to be creative. But once it was taken away from me, my creativity was put to the ultimate test,” he added.