The 65-year-old made the comparison about Valerie Jarrett in a tweet connecting the ex-aide to the Muslim Brotherhood and the movie Planet of the Apes.
Barr later deleted the tweet and apologised before saying she would be quitting Twitter.
In a statement, ABC Entertainment president Channing Dungey said: “Roseanne’s Twitter statement is abhorrent, repugnant and inconsistent with our values, and we have decided to cancel her show.”
The TV star has since deleted the post.
Barr’s tweet about Ms Jarrett had prompted users to point out the tweet was racist, with Barr replying: “Muslims r NOT a race.”
She told another follower: “It’s a joke.”
In another string of tweets, Barr connected Chelsea Clinton – daughter of Bill and Hillary – to Democratic donor George Soros.
She also retweeted people calling for the release of former English Defence League leader Tommy Robinson, who has been sentenced for contempt of court.
Barr later wrote on Twitter: “I apologize. I am now leaving Twitter.
She added: “I apologize to Valerie Jarrett and to all Americans.
“I am truly sorry for making a bad joke about her politics and her looks. I should have known better. Forgive me. My joke was in bad taste.”
Comedian Wanda Sykes had earlier said she wiould not return to the show following Barr’s Twitter tirade.
The star, who is a producer on the sitcom, wrote on social media: “I will not be returning to @RoseanneOnABC.”