Tesla Inc. CEO Elon Musk believes he had a verbal agreement in place with Saudi Arabia’s sovereign-wealth fund to help finance a plan to take the auto maker private, according to a person familiar with the matter, a contention that could preview how he will fight regulators’ accusation that he misled shareholders.

Mr. Musk was sued Thursday by the Securities and Exchange Commission, which alleged that he misled investors when he tweeted last month that he had funding secured to lead a Tesla buyout. The agency, which is seeking to oust Mr. Musk from Tesla, said in its complaint that he “knew that he had never discussed a going-private transaction at $420 per share with any potential funding source.”

Mr. Musk believes the SEC’s effort is flawed in assuming that a written agreement and fixed price were necessary for a deal, the person said. Mr. Musk also thinks regulators aren’t taking into account that Middle Eastern businesses routinely operate using verbal agreements in principle, the person said.

In addition, Mr. Musk has told people that he could have led a go-private transaction using his own stake in SpaceX, if major Tesla investors were on board. SpaceX is the privately held aerospace firm that Mr. Musk controls and is valued at tens of billions of dollars.

An SEC spokeswoman declined to comment about whether investigators looked into the possibility of a verbal agreement and how much weight should be given to it.

The descriptions of Mr. Musk’s thinking are the most detailed yet following the SEC lawsuit.

In a statement on Thursday, he said he was “deeply saddened and disappointed” by the SEC action. “Integrity is the most important value in my life and the facts will show I never compromised this in any way,” he said.

He had previously said that he announced his proposal on Twitter on Aug. 7 because he was beginning the process of talking to key investors and wanted to be transparent.

It is unclear whether Mr. Musk’s lawyers will use those explanations as they seek to counter the SEC allegations. He has added a new lawyer to his team, Chris Clark, a former federal prosecutor who is now at Latham & Watkins in New York.

Mr. Clark represented Mark Cuban in a 2013 trial in which the SEC argued the billionaire investor and sports magnate had committed insider trading. A jury found Mr. Cuban didn’t break any laws when he sold stock in a small Internet company after learning it would issue more shares.

A Tesla spokesman didn’t immediately respond to a request to comment.

Much is at stake for Mr. Musk and Tesla shareholders. Tesla shares dropped nearly 14% to $264.77 on Friday.

The SEC was ready on Thursday morning to announce a settlement with Mr. Musk when his lawyer called the agency to say the deal was off, according to a person close to the situation.

Mr. Musk had spent a day in the latter part of August giving testimony to the agency at its office in San Francisco. That testimony, along with other evidence the agency’s lawyers had gathered, led them to believe they had an open-and-shut case showing that the Aug. 7 tweet from Mr. Musk about taking Tesla private had violated securities laws, the person said.

Under terms of the proposed settlement, Mr. Musk would have been barred from serving as chairman of Tesla for two years, though he would be allowed to continue in his role as CEO, according to a person close to the situation. Mr. Musk would have paid a fine in the millions of dollars, another person said.

The deal had been approved by the SEC’s commissioners, whose role it is to approve enforcement actions by the agency, according to a person familiar with the matter. Then, in the final hour, Mr. Musk backed out of the deal, people close to the situation say.

With no settlement in place, the SEC instead Thursday afternoon filed a lawsuit against Mr. Musk in federal court in Manhattan, seeking to remove him from his role as Tesla’s chairman and CEO. A related federal criminal investigation into Mr. Musk’s tweets remains in the early stages, according to a person familiar with the matter. The bar for a criminal securities-fraud prosecution is higher than that for civil SEC cases.

Newsletter Sign-up Markets Alert Major financial-market and trading news. PREVIEW

After the settlement was derailed during the early-morning phone call on Thursday, the SEC lawyers from the agency’s San Francisco office—who happened to be at the SEC’s Washington headquarters for an annual staff-only conference—went into overdrive, pulling together a 23-page complaint that was filed later that day. The SEC’s five commissioners were scheduled to meet Thursday to consider several other enforcement matters, and the litigation against Mr. Musk was hurriedly added to the agenda, a person familiar with the matter said.

The SEC complaint alleges that Mr. Musk made false and misleading statements when he tweeted that Tesla was going private and that he “knew or was reckless in not knowing that his statements were false and misleading.”

Mr. Musk’s testimony to the SEC is reflected throughout the complaint. He told the SEC lawyers that he arrived at the price of $420 based on a 20% “standard premium,” the complaint says. “This calculation resulted in a price of $419, and Musk stated that he rounded the price up to $420 because he had recently learned about the number’s significance in marijuana culture and thought his girlfriend ‘would find it funny, which admittedly is not a great reason to pick a price,’” according to the complaint.

The SEC complaint focused on testimony from Mr. Musk about the status of his talks with a Saudi investment fund about a possible investment in Tesla as well as the establishment of a Tesla production facility in the Middle East, the complaint says. Mr. Musk said that the fund had expressed interest in taking Tesla private, the complaint says. In his testimony, he told the SEC that “he assumed without confirming” that the fund was proposing “a ‘standard’ going-private transaction, but the terms of any such deal were not discussed,” the complaint says.

During a July 31 meeting between Mr. Musk and representatives of the Saudi fund, the prospect of a production facility in the Middle East was discussed, the complaint says. “According to Musk, he expressed openness but made no commitment; Musk assumed that whether a Tesla production facility in the Middle East was a precondition to the Fund’s willingness to take Tesla private would depend on the amount of capital the Fund was required to commit to the transaction,” the complaint says.

“Musk did not discuss his assumption with the representatives of the Fund,” the complaint says.

The complaints notes that Mr. Musk had been in a lengthy battle with short sellers, who were betting on Tesla’s failure. Tesla shares climbed 10% after Mr. Musk’s tweets.

—Aruna Viswanatha and Michael Rapoport contributed to this article.

Write to Tim Higgins at Tim.Higgins@WSJ.com, Dave Michaels at dave.michaels@wsj.com and Susan Pulliam at susan.pulliam@wsj.com