Facebook Inc. executive and virtual-reality wunderkind Palmer Luckey was a rising star of Silicon Valley when, at the height of the 2016 presidential contest, he donated $10,000 to an anti-Hillary Clinton group.

His donation sparked a backlash from his colleagues. Six months later, he was out. Neither Facebook nor Mr. Luckey has ever said why he left the social-media giant. When testifying before Congress about data privacy earlier this year, Facebook Chief Executive Mark Zuckerberg denied the departure had anything to do with politics.

Mr. Luckey, it turns out, was put on leave, then fired, according to people familiar with the matter. More recently, he has told people the reason was his support for Donald Trump and the furor that his political beliefs sparked within Facebook and Silicon Valley, some of those people say.

FACEBOOK PATENT HINTS AT CREEPY NEW FEATURE

Internal Facebook emails suggest the matter was discussed at the highest levels of the company. In the fall of 2016, as unhappiness over the donation simmered, Facebook executives including Mr. Zuckerberg pressured Mr. Luckey to publicly voice support for libertarian candidate Gary Johnson, despite Mr. Luckey’s yearslong support of Mr. Trump, according to people familiar with the conversations and internal emails viewed by The Wall Street Journal.

Mr. Luckey’s ouster from Facebook was a harbinger of battles that have broken out over the past year over the overwhelmingly liberal culture of Silicon Valley, which has given the tech industry public-relations headaches and brought unwanted attention from Washington.

EXPERTS WARN FACEBOOK HAS A 'DISTURBING DISREGARD' FOR USER PRIVACY

Executives from Facebook, Twitter Inc. and Google, a unit of Alphabet Inc., have had to answer questions from lawmakers about potential bias in their treatment of conservative viewpoints. Tech executives concede that Silicon Valley is predominantly liberal—Mr. Zuckerberg said in Senate testimony that it is “an extremely left-leaning place”—yet they have steadfastly maintained that politics doesn't play a role in how they police content on their sites.

Click here for more from The Wall Street Journal, where this story originally appeared.