The Gone Girl star, 42, appeared as a guest on Real Time With Bill Maher last week, but became angered over the negative, "incomplete" image that Maher and fellow guest, author Sam Harris, were painting of Muslims.
"We have been sold this meme of Islamophobia, where criticism of the religion gets conflated with bigotry towards Muslims as people," Harris said. "It's intellectually ridiculous."
Mayer supporting him, describing Islam as "the only religion that acts like the mafia" and will "f***ing kill you if you say the wrong thing, draw the wrong picture or write the wrong book".
Cue much anger from Affleck, who called Harris' picture of Islam as "the motherhood of bad ideas" over-generalised and "ugly".
"Hold on – are you the person who officially understands the codified doctrine of Islam?" Affleck responded, branding the pair's remarks "gross" and "racist" and arguing that they were akin to saying "Oh, you shifty Jew".
"Your argument is, 'You know, black people, they shoot each other,'" he said.
Maher was recently criticised for expressing his view that female genital mutilation is an Islamic problem.
Affleck was on his show to promote Gone Girl, in which he stars as the husband of a woman who mysteriously disappears on their 5th anniversary, leading him to become the prime suspect in a murder investigation.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies