Jessica Simpson started to rely on alcohol as a way to cope with anxiety during her relationship with ex John Mayer, she writes in her new memoir — which also reveals her addiction to booze and pills.

Simpson, now 39, started dating Mayer, now 42, following her divorce from first husband Nick Lachey in 2006, and she says she fell hard fast. But while Mayer made Simpson feel confident sexually, she began to feel intimidated intellectually.

“The connection was so strong that he made me feel seductive, and he spoke about sex and my body in a way that made me feel powerful, at least physically,” Simpson writes in her upcoming memoir “Open Book” (as excerpted by People). “Where I felt insecure in the beginning was that I always felt I was falling short of the potential he was in me. I constantly worried that I wasn’t smart enough for him.”

The pop star became the butt of many jokes after asking Lachey on camera if Chicken of the Sea tuna actually contains chicken. And she says Mayer was so intelligent, she felt she couldn’t keep up.

“He was so clever and treated conversation like a friendly competition that he had to win,” she writes of the Grammy winner. “When I tried to leap back in and say something to add to the dialogue he was having with himself, he would challenge what I said and I’d get quiet. I was so afraid of disappointing him that I couldn’t even text him without having someone check my grammar and spelling.”

The pressure pushed Simpson to reach for the bottle.

“My anxiety would spike, and I would pour another drink,” the fashion mogul writes. “It was the start of me relying on alcohol to mask my nerves.”

In her memoir, out next month, Simpson reveals that she became addicted to pills and alcohol and believes her substance abuse was partially brought on by the trauma surrounding childhood sexual abuse.

Simpson — who is now married to Eric Johnson and has three children with him — eventually sought treatment in late 2017 and is now sober.

For more on Jessica Simpson’s candid memoir, listen to this episode of the Page Six podcast, “We Hear“: