SAN FRANCISCO — Palmer Luckey, a founder of the virtual-reality technology company Oculus, has left Facebook three years after the social network acquired his company for close to $3 billion.

Mr. Luckey’s departure was announced two months after a trial in federal court over allegations that he and several colleagues had stolen trade secrets from a video-game publisher, ZeniMax Media, to create the Oculus technology. A jury found Facebook liable for $500 million in damages, in part for Mr. Luckey’s violation of a confidentiality agreement.

“Palmer will be dearly missed,” Tera Randall, an Oculus spokeswoman, said in a statement. “His inventive spirit helped kick-start the modern VR revolution and helped build an industry.”

Ms. Randall declined to disclose the terms of Mr. Luckey’s departure.

The move adds another twist to Facebook’s bumpy foray into virtual-reality technology. Mark Zuckerberg, Facebook’s chief executive, has bet big on virtual reality as part of the social network’s future, saying he envisioned social interactions between people will someday exist inside virtual worlds. Oculus, he has said, could be a catalyst for that.

But from the start, Oculus has run into problems. Adoption of the Oculus technology and headsets has been slower than Facebook had anticipated. The selection of content made for VR headsets is still small, though growing.

“These things end up being more complex than you think upfront,” Mr. Zuckerberg said in January while appearing in court for the ZeniMax trial. “If anything, we may have to invest even more money to get to the goals we had than we had thought upfront.”

Mr. Zuckerberg has committed to spending more than $3 billion over the next decade to get virtual reality off the ground and into the mainstream.

Mr. Luckey has had other stumbles. In 2016, it became public that he had donated $10,000 to Nimble America, a pro-Trump political organization that promoted far-right memes and slogans on social media sites like Reddit, Twitter and Facebook. He has since apologized for the impact his actions had on Oculus and its partners.

Mr. Luckey did not immediately respond to a Facebook message requesting comment.

In January, Facebook appointed a new leader, Hugo Barra, to head up the company’s virtual-reality efforts, including Oculus.