Musk’s xAI Sues Former Engineer Over Alleged Grok Code Theft to OpenAI

In a dramatic twist in Silicon Valley’s escalating AI wars, Elon Musk’s artificial intelligence startup, xAI, has filed a lawsuit against former engineer Xuechen Li, accusing him of stealing the entire codebase of its Grok chatbot before accepting a role at rival firm OpenAI.
The lawsuit, lodged in a California federal court on August 28, 2025, alleges that Li copied confidential data, attempted to erase evidence, and then proceeded to liquidate $7 million worth of xAI stock days before resigning. According to court filings, the stolen information could save competitors billions of dollars in research and development, giving them shortcuts into xAI’s proprietary breakthroughs.
xAI claims that Li’s actions were premeditated. On the same day he sold a tranche of stock, he allegedly transferred sensitive files from his company laptop to personal devices, deleted browser histories, and compressed file archives to conceal his trail. Li resigned on July 28, 2025, after securing a position at OpenAI, with his start date set for mid-August.
Perhaps most damaging for Li’s defense, the complaint states that he admitted to the theft in mid-August, even putting his confession in writing. However, he allegedly withheld critical passwords after receiving a legal demand letter, complicating xAI’s investigation and raising concerns about what data might have already been shared.
Musk’s firm is seeking monetary damages, a restraining order to block Li’s employment at OpenAI, and a forensic review of his devices. The case has quickly become a flashpoint in the AI industry, where talent poaching, secrecy, and speed-to-market pressures have created fierce rivalries.
With Grok marketed as a ChatGPT rival, the lawsuit underscores the high stakes: whoever controls the most advanced large language models may dominate the next era of computing. Legal experts suggest the case could reshape how AI companies protect trade secrets amid an intensifying arms race.