Roseanne Barr's ex-husband has claimed she wanted her sitcom to be cancelled.

The 'Roseanne' actress has been embroiled in controversy this week after racist comments made on social media resulted in US TV network ABC pulling her hugely popular sitcom.

Now, her former partner Tom Arnold has told The Hollywood Reporter: ''It had to happen. And I am going to tell you the truth, she wanted it to happen, if you saw how her tweets escalated this weekend.

''If it hadn't happened yesterday, this season would have been so awful for everyone every day because she would have felt like she was [being] taken advantage [of], just like when I left the show.''

The 65-year-old writer was married to the comedienne for four years until 1994, and previously worked on 'Roseanne' from 1988.

He added: ''ABC lost maybe $1 billion from this; this show was grinding out money hand over fist and they lost it all because somebody didn't say, 'Get that phone out of her hand.'

''She's not going to go on TV and say these things. But you put that phone in her hand and she is a loose cannon.''

His comments about the incident come after Barr, also 65, blamed her racist tweet on sleeping pills.

She likened Valerie Jarrett - a former aide of Barack Obama - to an ape and accused her of supporting the Muslim Brotherhood political party on Twitter, and later claimed that her use of the prescription drug Ambien was to blame for her post.

The comedy actress wrote on the micro-blogging platform: ''I think Joe Rogan is right about Ambien.

''Not giving excuses for what I did(tweeted) but I've done weird stuff while on ambien-cracked eggs on the wall at 2am etc. [sic]''

However, Roseanne conceded that there was no defence for her inflammatory tweet and has offered an apology to Jarrett.

In a now-deleted message, she wrote: ''Guys I did something unforgiveable so do not defend me. It was 2 in the morning and I was ambien tweeting-it was memorial day too-i went 2 far & do not want it defended-it was egregious Indefensible. I made a mistake I wish I hadn't but...don't defend it please. ty. [sic]''