"It's the only religion that acts like the mafia -- that will fucking kill you if you say the wrong thing, draw the wrong picture, or write the wrong book," Maher told Affleck.
But the "Gone Girl" star didn't agree with Maher and panelist Sam Harris, who were painting the religion with broad, negative strokes. Affleck insisted the majority of the 1.5 billion people who practice Islam were neither violent nor tolerant of violence.
"Hold on -- are you the person who officially understands the codified doctrine of Islam?" Affleck asked. "[Your characterization] is gross and racist. It's like saying, 'Oh, you shifty Jew!'"
Affleck compared Maher's line of thinking to a popular fallacy used to discriminate against African Americans. "Your argument is, 'You know, black people, they shoot each other,'" he said.
But Maher and Harris insisted Affleck had misrepresented their positions. Harris, the author of the New York Times best-seller book "End of Faith," had started off the segment trying to explain that one should be allowed to criticize the tenets of Islam -- or any idea, really -- without being called a bigot.
"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."
The episode's other panelists included Pulitzer Prize-winning journalist Nicholas Kristof and Republican MSNBC analyst Michael Steele. While Steele stayed mostly quiet during the heated exchange, Kristof sided with Affleck.
He argued Maher and Harris had painted an "incomplete" portrait of the widely practiced religion.
Watch the video of their lengthy, heated exchange above.