ELLEN DeGENERES and wife PORTIA de ROSSI have been plunged into a booze and drug nightmare – as the talk show queen raced to save her companion’s life, say sources.

Ellen, 56, reportedly checked her 41-year-old wife into the Passages Malibu rehab center in May for a 30-day treatment program.

Reports emerged that substance abuse sparked the decision to get help – but The ENQUIRER has learned from a source that cocaine may have played a role in the crisis. The “Arrested Development” star secretly entered the facility as the couple’s five-year marriage unraveled amid reports that Ellen was cheating and that the couple had engaged in vicious shouting matches.

Sources feared that Portia was drowning her heartache by knocking back upwards of a bottle of wine daily and topping it off with a pill. “It was booze and drugs that plunged them into a nightmare,” claimed a close source. “Although their marriage has deteriorated, Ellen loves Portia and likely saved her life by putting her in rehab.” Ironically, before the crisis, the two were bracing for a $220 million divorce showdown, and social media sites began exploding with chilling rumors.

One participant in a lesbian-oriented chat room alleged: “I have heard Portia has gone back to using cocaine because of all the personal problems in her life.” And the close source confided: “Portia felt she needed to numb her unhappiness and pain with alcohol and drugs.” A friend told The ENQUIRER that she believes Portia is no stranger to cocaine.

“Back when she was a struggling actress, I know she experimented with it as a way of coping with the pressure,” said her pal.

During a 2010 interview about her anorexia memoir, “Unbearable Lightness,” Portia mentioned cocaine but stopped short of saying she had used the drug. Portia confessed to popping diet pills at the tender age of 15. “I abused my body,” she admitted. “I had bulimia.”

Incredibly, her body became so ravaged that in 2001 she was diagnosed with osteoporosis and cirrhosis of the liver. After completing her recent stint at Passages Malibu, Portia was spotted with Ellen on a yacht off the Croatian island of Hvar, apparently taking an exotic vacation to work on their troubled marriage.

Dr. Greg Smith, who has not treated Portia but is an addiction expert and producer of the film “American Addict,” told The ENQUIRER: “The second Portia was out of rehab, she was at risk of a relapse. She needs…to make sure nobody tempts her with alcohol or drugs. This will not be an easy road for her.”