Some of Republican presidential candidate Donald Trump’s posts on Facebook have set off an intense debate inside the social media company over the past year, with some employees arguing certain posts about banning Muslims from entering the U.S. should be removed for violating the site’s rules on hate speech, according to people familiar with the matter.

The decision to allow Mr. Trump’s posts went all the way to Facebook Inc. Chief Executive Mark Zuckerberg, who ruled in December that it would be inappropriate to censor the...