“Will & Grace” star Megan Mullally will walk down the aisle in December — but only if she gets anger management therapy first!

The 43-year-old actress, who plays booze-swilling ditz Karen Walker on the prime-time hit, has pitched one too many fits to suit her fiancé Nick Offerman, sources say.

Both want to take the plunge, but Nick won’t do it until she gets her temper under control.

And, incredibly, Megan has agreed to his terms in order to win the man she loves!

“Poor Nick has been the victim of Megan’s rage for too long,” a close friend of the actress told The ENQUIRER. “People think Megan is like her zany character on ‘Will & Grace,’ but in real life she’s got a fiery side you wouldn’t believe.

Although Nick, 32, has been a calming influence in her life, he’s fed up now.

“But he told Megan if she gets anger management counseling he’d marry her before the New Year.”

Megan was married in the early 1990s to entertainment executive Michael Katcher.

But that union ended in divorce, and in May 2000 she met and fell for Nick. Now sources say she’s realizing her temper and high-handed ways could hurt her relationship and she wants to do something about it.

“Although she’s crazy about him, Megan can turn on Nick and demand star treatment with the snap of her fingers,” said the star’s friend.

“They’ve lived together for almost two years, but when Megan throws a tantrum she kicks Nick out on a whim. So far their passionate make-up sessions have kept the love alive, but Megan has thrown Nick out before — and the last time was it for him.”

The couple’s relationship reached a final crisis recently when Megan lost her temper over their social life.

“Nick made dinner plans without first consulting with Megan,” another source close to Megan told The ENQUIRER. “Megan hit the roof, pointed her finger in his face and shouted, ‘You do not run my schedule! I don’t care what plans you made — cancel them! I’m busy!’

“When Nick tried to offer an explanation, Megan went off. She was enraged.”

This time, Nick refused to take it and gave Megan an ultimatum. And Megan took stock of herself — and decided she needs to do whatever it takes to manage her temper.

“Megan realizes that the worst thing that could happen to her is to lose Nick,” the friend said.

“She told me, ‘I love Nick and I want to spend my life with him. I need to do this for our relationship — and I also need to do this for myself.’ “