Clay, 61, was onstage at the Laugh Factory in Las Vegas when the owner approached him and told him that a special guest had arrived.
"A close friend of mine, I'd say about 33 years," he told the crowd. "There haven't been many as controversial, as outspoken or as f—kin' funny. Let's hear it for Roseanne Barr!"
Barr received a standing ovation from most of the audience in what was her first live performance since ABC canceled the "Roseanne" reboot last May.
Clay shared a series of videos from the show, including a snippet of Barr backstage watching his opening act, comedian Eleanor Kerrigan.
The pair danced onstage together at the conclusion of the show, with Barr removing her shoes.
The beleaguered Barr thanked Clay for "telling the truth," which she said "is illegal nowadays."
Clay – the first comedian to ever sell out Madison Square Garden despite being banned from MTV for life over his edgy material – and Barr received a standing ovation at the conclusion of the show, after which Clay posted a photo with Barr expressing his support for her.
"She hadn’t been onstage since she got fired from ABC, and last night made so many people laugh, and they loved her," he wrote. "We are the comedians of this crumbling world, but we are human and sometimes screw up ... Our job is to keep you laughing amongst the [chaos] of a world going through pain."
"She was nervous and afraid last night," he added, "but once the audience laughed, she was right back in the groove and crushed. So proud of her!"