How Elon Musk and Sam Altman went from besties to bitter rivals

In the 11 years since Elon Musk and Sam Altman helped start OpenAI, their once tight bond has unwound, leaving the two billionaires fighting it out in court.

How Elon Musk and Sam Altman went from besties to bitter rivals

A combination photo shows CEO of OpenAI Sam Altman (L) on April 28, 2026 and Elon Musk on April 29, 2026 during the trial in Elon Musk's lawsuit over OpenAI for-profit conversion at a federal courthouse in Oakland, California, U.S.

Manuel Orbegozo | Reuters

In December 2015, Elon Musk and Sam Altman sat together at the Vanity Fair New Establishment Summit in San Francisco for an interview, publicly touting their new partnership as co-chairs of a fledgling artificial intelligence research lab.

Musk was a multibillionaire due to his stake in Tesla, which had gone public five years earlier, and Altman was running famed startup incubator Y Combinator. The pair had been working closely that year on an AI initiative they hoped would prevent Google from establishing monopoly control over the powerful technology. Their project, a nonprofit, was called OpenAI.

Over the past three weeks, the collapse of the once-tight bond between two of the most prominent names in AI has been the subject of a high-profile trial in Oakland, California, after Musk sued Altman and OpenAI in 2024 for allegedly violating their commitment to keep OpenAI as a nonprofit. OpenAI is now valued at over $850 billion, and Musk's SpaceX has a valuation of $1.25 trillion after merging with his AI lab, xAI, in February.

Both companies are racing for the public market, with SpaceX expected to disclose its prospectus as soon as this week, ahead of what could be a record offering next month. Before getting to address eager investors, Musk had to testify to a jury in downtown Oakland in an effort to prove his case and, if successful, potentially throw a major wrench into OpenAI's ambitious plans.

"What you can't do is have your cake and eat it too," Musk said on April 29, in response to questioning from OpenAI's counsel. He accused Altman and Greg Brockman, OpenAI's president and another co-founder, of enriching themselves from a charity while also trying to reap the positive associations that come from running a nonprofit.

Musk used his time at the witness stand to emphasize a message that he's been shouting on his social media app X, also now owned by SpaceX, for years: OpenAI wouldn't exist without him.

"I came up with the idea, the name, recruited the key people, taught them everything I know, provided all the initial funding," Musk said.

The Musk vs. OpenAI trial is underway — here's where things stand

Altman testified last week that he and his co-founders didn't make any commitments to Musk about the company's corporate structure.

A big problem from the early days, he argued, was that Musk felt very strongly about having total control over OpenAI, at least initially, in part because Musk didn't trust other people to make decisions.  

"I was extremely uncomfortable with it," Altman testified, regarding Musk's quest for power.

Lawyers for Musk and OpenAI concluded their closing arguments on Thursday after three weeks of proceedings. A jury will begin deliberations on Monday to determine the validity of Musk's claims and if OpenAI, Altman and Brockman should be held liable for a breach of charitable trust and unjust enrichment.

Regardless of the ultimate outcome, neither tech magnate is likely to win in the court of public opinion, said University of California at Berkeley Law School professor Stavros Gadinis.

"After weeks of damaging testimony, the public is left choosing between two dueling billionaires, each convinced he is the rightful steward of transformative technology," Gadinis said by email. "The answer most people will reach is: neither."

How it started

The partnership began 11 years ago, in May 2015, when Altman emailed Musk asking if he thought it would be a good idea for Y Combinator to start a "Manhattan Project for AI." Musk said the idea was "probably worth a conversation."

OpenAI launched in December 2015, with Musk committing to fund the charity with up to $1 billion.

"I'm super impressed with everyone so far," Musk wrote to Altman in November 2015, according to emails that were made public as part of discovery in the case. "This is a great team."

Cracks began forming by 2017.

Though OpenAI was making progress on research and development, Musk had demanded that Altman and other co-founders, including Brockman and Ilya Sutskever, make a list of employees and their key contributions, and fire everyone who didn't immediately make the grade, filings show.

OpenAI was burning cash and needed significantly more for computing resources. Leaders discussed converting the lab into a for profit. The question of who should be CEO and hold controlling stakes loomed large, particularly for Musk, who sought as much as 90% ownership in a for-profit entity.

Altman and other co-founders declined, arguing that no single person or group should have unilateral control over "artificial general intelligence," technology that may prove smarter than a human.

A key point of tension in the relationship emerged in June 2017, when Tesla poached Andrej Karpathy, an AI researcher, from OpenAI. In text messages between Musk and his employees, including OpenAI board member Shivon Zilis and a project director Sam Teller, Musk's team cheered the hire, according to correspondence made public in discovery.

Lawyer Steven Molo questions his client Elon Musk as OpenAI CEO Sam Altman watches, during Musk's lawsuit trial over OpenAI's for-profit conversion before U.S. District Judge Yvonne Gonzalez Rogers at a federal courthouse in Oakland, California, U.S., April 29, 2026 in a courtroom sketch.

Vicki Behringer | Reuters

Zilis, who has four children with Musk, took the stand earlier this month and was questioned by lawyers for both sides about the conversations she had about OpenAI's corporate structure around 2017 and 2018, as well as whether Tesla was trying to poach OpenAI employees while she was on the board.

After an OpenAI lawyer showed Zilis text messages with her celebrating Karpathy's acceptance of Musk's job offer, Zilis conceded that Musk approached Karpathy first.

Musk later offered his OpenAI co-founders "an apology and a confession," Brockman recalled during his testimony.

While internal drama was brewing, OpenAI's technology continued to advance. By August 2017, its systems were able to beat the world's top players of Dota 2, a multi-player action game. Musk promoted the accomplishment on Twitter.

"OpenAI first ever to defeat world's best players in competitive eSports," Musk wrote. "Vastly more complex than traditional board games like chess & Go."

A month later, he told Altman and other OpenAI leaders in an email that he'd "had enough." If he couldn't have control over OpenAI, he was ready to walk.

"Either go do something on your own or continue with OpenAI as a nonprofit," Musk wrote in an email that was disclosed in a court filing. "I will no longer fund OpenAI until you have made a firm commitment to stay or I'm just being a fool who is essentially providing free funding for you to create a startup."

Musk had ended his monthly contributions to the company. Far from putting in $1 billion, his donations totaled around $38 million.

'Tesla is a car company'

With OpenAI desperate for support, Musk, Zilis and Teller made one last push to bring the lab under Musk's control, suggesting it should fold into Tesla. In an effort to sway Altman, Musk's team invited him for a tour of a Tesla factory and promised him a board seat at Tesla.

Altman said during his testimony that he didn't think it was the right fit, and he worried that the nonprofit would have effectively been destroyed if it became part of Tesla.

"Tesla is a car company, and it does not have the mission of OpenAI," Altman said on the stand. "I don't think we would've had the ability to ensure that the mission was acted on."

After the merger effort was rejected, Musk wrote in a December 2018 email to Altman and OpenAI leadership that his "probability assessment of OpenAI being relevant to DeepMind/Google without a dramatic change in execution and resources is 0%. Not 1%."

Musk testified that the for-profit affiliate OpenAI created has become the "tail wagging the dog," and violates the founding charity's mission and promises the founders allegedly made to him.

Musk left the OpenAI board in 2018, a move that OpenAI said in a blog post was necessary to "eliminate a potential future conflict for Elon" as Tesla started to focus more on AI.

For the next five years, Musk rarely mentioned OpenAI in public. And whatever rifts had formed in his relationship with Altman were largely absent from social media.

Altman regularly praised Musk on Twitter, writing in 2019 that "betting against Elon is historically a mistake," and posting in October 2022, that Musk serves as "a reminder of just how much one person can do."

The latter post came a month before OpenAI introduced ChatGPT. That's when everything changed, as the generative AI boom led to a surge of investment in the space. In January 2023, Microsoft pumped $10 billion into OpenAI, making clear that the race to commercialization was underway. OpenAI had already established a for-profit subsidiary.

Microsoft CEO Satya Nadella, right, greets OpenAI CEO Sam Altman during the OpenAI DevDay event in San Francisco on Nov. 6, 2023.

Justin Sullivan | Getty Images News | Getty Images

Musk began bashing Altman and OpenAI online. He ranted in a post on Twitter, which Musk had purchased by then and was later renamed X, about the startup's funding and partnership with Microsoft:

"OpenAI was created as an open source (which is why I named it 'Open' AI), non-profit company to serve as a counterweight to Google, but now it has become a closed source, maximum-profit company effectively controlled by Microsoft," Musk wrote in a post in February 2023. "Not what I intended at all."

Altman responded with a text that was released in a court filing.

"i am tremendously thankful for everything you've done to help—i don't think openai would have happened without you—and it really f---ing hurts when you publicly attack openai," Altman wrote to Musk.

Musk was undeterred. In March 2023, he incorporated xAI, intending for it to become a direct competitor to OpenAI, even actively recruiting from the company. Zilis, who by that point had children with Musk, resigned from the OpenAI board.

She was headed in that direction the prior month, writing in a text message to a friend that, "When the father of your babies starts a competitive effort and will recruit out of OpenAI there is nothing to be done." 

Since filing his lawsuit in 2024, Musk has escalated his war of words with his OpenAI co-founders, mostly on his preferred platform X, calling the two top leaders "Scam Altman" and "Greg Stockman".

"I could have started OpenAI as a for-profit corporation," he wrote in a post on X just as the trial was getting underway. "Instead, I started it, funded it, recruited critical talent and taught them everything I know about how to make a startup successful FOR THE PUBLIC GOOD. Then they stole the charity."

—CNBC's Kate Rooney contributed to this report.

WATCH: Musk vs. OpenAI trial week 3: Here’s what to know

 Here's what to know