Barr was introduced by fellow comic Andrew Dice Clay, who called her a close friend of "about 33 years" who hadn't performed on stage "since she said something" and was ready to tell a few surprise jokes.
"When you get fired, you get real suicidal," she said. "But I'd never kill myself because that would make too many f—ing people happy. And I'm not about to make people happy."
"Dear ABC, when you asked me back to once again bail out your shit, f—in', low-rated network, I did so with the same vigor I've always rocked, and I delivered you the highest ratings you've had in 10 f—ing years," she blasted her old network.
"At the first sign of controversy, you killed me off with a drug overdose," she said. "But you know what? I ain't dead, b—es."
Clay responded, "That is so great," about Barr, who said she hadn't done stand-up comedy since the 1960s. The two then danced together on stage.
Clay shared several videos and photos from the surprise set, including one snap of the two comedians with their arms wrapped around each other.
"She Hadn't Been On Stage Since She Got Fired From ABC , And last Night Made So Many People Laugh ... And They Loved Her!" he captioned the photo. "We are The Comedians Of This Crumbling World , But We are Human and Sometimes Screw Up , or Things Taken The Wrong way !!! Our Job Tho , is To Keep you Laughing Amongst The KAOS Of a World going Through Pain !!! She was Nervous and Afraid last Night , But Once the Audience Laughed ... She was Right Backvin The Groove and Crushed !!! So Proud Of Her ... Love You Roseann."
ABC canceled Roseanne, which was a revival of Barr's 1980s and '90s sitcom, after one season last May when Barr used a Planet of the Apes reference to describe Jarrett, who is black. The network replaced Roseanne with The Conners, the first episode of which Barr's character was killed off with a drug overdose.
Photo credit: Vera Anderson / Contributor / Getty