Senator Al Franken, Democrat of Minnesota, said on Monday that he was canceling a guest appearance, scheduled for Friday, on the HBO late-night show “Real Time With Bill Maher” after an incident last Friday in which Mr. Maher used a racial epithet during an interview with Senator Ben Sasse, Republican of Nebraska.

A spokesman for Mr. Franken said in a statement, “What Bill Maher said was inappropriate and offensive, which is why he made the decision not to appear on the next episode of ‘Real Time.’ He was glad to see Bill, who the senator considers to be a good friend, apologize and express sincere regret for his comment.”

In his interview with Mr. Sasse, Mr. Maher said he needed to visit Nebraska more often, to which the senator answered: “You’re welcome. We’d love to have you work in the fields with us.”

Mr. Maher said: “Work in the fields? Senator, I’m a house nigger. No, it’s a joke.”

The remarks were widely criticized, and Mr. Maher apologized for them on Saturday. “I regret the word I used in the banter of a live moment,” he said in a statement at the time. “The word was offensive and I regret saying it and am very sorry.”