CHARLESTON, S.C. — A sign at a cafe in the Charleston Gaillard Center read “Welcome Aziz Ansari. Treat Yo’ Self,” a reference to Mr. Ansari’s character from the former NBC sitcom “Parks and Recreation.” Mr. Ansari, who was born in Columbia, S.C., and grew up in Bennettsville, was about to have a homecoming of sorts.

He took the stage on Tuesday night at the center, and the sold-out crowd let him know he was home, too, giving him a partial standing ovation. Mr. Ansari, in jeans and a red plaid shirt, responded by saying Charleston was “really one of my favorite places,” before beginning a comedy set testing out new material.

The show was among a handful of performances that Mr. Ansari, 35, has given since January, when Babe.net published accusations from an anonymous woman saying he had behaved inappropriately with her on a date. The woman said that when they returned to his apartment, he tried to pressure her into having sex despite her repeated refusals. Eventually, Mr. Ansari called the woman a car. The next day, she sent a lengthy text message to Mr. Ansari explaining how “uneasy” his behavior had made her. Mr. Ansari wrote back, the article reported, saying, “Clearly, I misread things in the moment and I’m truly sorry.” In a statement after the article was published, Mr. Ansari said, “I took her words to heart and responded privately after taking the time to process what she had said.”

He added: “I continue to support the movement that is happening in our culture. It is necessary and long overdue.”