Shane Gillis, a 31-year-old stand-up comedian who was named last week to the “Saturday Night Live” cast, has mimicked caricatures of Chinese accents. He has called it a “hassle” to have to speak with a waiter in a Chinese restaurant. He has used a racial slur to refer to the entrepreneur Andrew Yang.

And in response, Mr. Yang, who has emerged as one of just a handful of viable Asian-American candidates ever to seek a major party’s nomination for president, has preached forgiveness.

“Shane — I prefer comedy that makes people think and doesn’t take cheap shots. But I’m happy to sit down and talk with you if you’d like,” he said in a tweet over the weekend. “For the record, I do not think he should lose his job. We would benefit from being more forgiving rather than punitive. We are all human.”

Then, about an hour after the announcement, Mr. Yang tweeted again, suggesting that Mr. Gillis had taken him up on his offer to talk things out.

“Shane Gillis reached out,” Mr. Yang said. “Looks like we will be sitting down together soon.”

A spokesman for Mr. Yang did not have any comment on Mr. Gillis’s departure from the show on Monday night. Nonetheless, the dayslong ordeal with its swift and sudden turn has had the side effect of thrusting Mr. Yang, a long-shot candidate with a loyal following, into the spotlight and placing him at the center of a national conversation about racism, outrage culture and absolution.

For more than a year, Mr. Yang, 44, has built support from outside the political establishment by purposely staying above the political fray, posting videos of himself having fun playing basketball and preaching “humanity first” as a central tenet of his campaign. His response to Mr. Gillis over the weekend echoed those inviting approaches.

As one of three remaining candidates in the race who do not have a background in politics, Mr. Yang has won fans by speaking off the cuff and peppering his stump speech with sometimes self-deprecating humor. Because he has made automation and concern over mass unemployment central themes of his candidacy, he has won the support of some young, white, male Trump voters while at the same time attracting progressives and a significant share of Asian-Americans — all groups he seeks to hold together under the apolitical campaign catch phrase “Not left, not right, but forward.”

But his handling of race has sometimes undermined that careful balancing act and raised the concerns among some who say he has been too willing to lean in to stereotypes about Asian-Americans to win support. His biggest applause line remains “The opposite of Donald Trump is an Asian man who likes math”; in front of a national television audience during the debate last week, he observed, “I am Asian, so I know a lot of doctors.”

In tweets, Mr. Yang also reiterated that he had been the target of racial epithets in the past. Asked about his jokes about liking math and knowing doctors, he has maintained that the Asian-American community is diverse, that his individual experience does not speak for everyone and that Americans are smart enough to see through the model minority myth, which overgeneralizes Asians as diligent and high-achieving.

In an interview on Monday with The New York Times just hours before Mr. Gillis was dropped from “S.N.L.,” Mr. Yang said he had not meant to compare his experience as an Asian-American to “the experience of growing up black in this country.” He said he had intended only to make an “observation” about anti-Asian racism and the fact that it is not always taken seriously.

Mr. Yang said he and his wife had sat down to watch Mr. Gillis’s comedy routines for 30 minutes to an hour and had concluded that he was not “malignant or evil.” He also said he had resisted sending a tweet containing an expletive that would have more forcefully expressed his anger at Mr. Gillis.

“There’s a complex set of reactions one has,” Mr. Yang said.

He said that someone had yelled a slur at him out a car window “just the other day” and added that he had talked to his wife about the experience. He said they had bemoaned the fact that such a slur could eventually be directed at one of their boys.

Mr. Yang also denied that there were any politics at play. “This is both how I genuinely see this and what I think is best,” he said. “I totally respect people who have different points of view.”

Danielle Seid, an assistant professor of English at Baruch College who studies film and television history, said Mr. Yang had definitely found himself “in a tough spot.” He had been right to point out that anti-Asian racism has often not been treated seriously, she said, but he may not have done “a good job of parsing that with his tweets about the n-word.”

Mr. Yang’s comments could have been read as an argument that “Asians have it worse” than other minority groups, when “it’s pretty clear that, in terms of racist policies and practices and culture in the United States, so much of it is founded on anti-black racism,” said Ellen Wu, an associate professor of history at Indiana University.

At a broader level, both Professor Seid and Professor Wu said Mr. Yang’s high profile had made him something of a spokesman for the Asian-American community. As such, Professor Seid said she wished Mr. Yang had been “more forceful in condemning Mr. Gillis’s ‘jokes’ and taken the opportunity to congratulate Bowen Yang,” one of the show’s writers who was also elevated to a featured performer’s position.

Kevin Xu, a co-host of the Model MAJORITY Podcast and a former Obama White House staff member, said he had wanted Mr. Gillis to lose his job “because he is racist and not funny.”

But he defended Mr. Yang’s handling of the situation. Given that Mr. Yang is a candidate for president, Mr. Xu said he believed it was appropriate for him to “take the high road.”

“This is the best way he could have handled something like this,” Mr. Xu said. “I think over all he’s doing a pretty good job owning up to his minority status while still doing what he needs to do to run for president.”

“I don’t think that, for someone like him — just like Barack Obama or Hillary Clinton or any other historical candidate trying to break any sort of ceiling — they can do this perfectly,” Mr. Xu added. “It’s a very, very high-wire act. It’s very hard.”