When Thursday began, Elon Musk had a deal on the table.

After days of tense negotiations, the Securities and Exchange Commission and lawyers for Mr. Musk, Tesla’s chief executive, had agreed on a settlement that would bring to a close a drama that has riveted Wall Street and Silicon Valley for the past two months.

Under the terms of the agreement, what started on Aug. 7 — when Mr. Musk posted on Twitter that he had “funding secured” to take Tesla private for $420 a share — would end with some modest penalties and Mr. Musk staying on as chief executive, according to two people briefed on the talks.

The plan, as it was negotiated by lawyers, was for Mr. Musk to step down as chairman of Tesla within 45 days and not resume that post for two years. The company, also a party to the proposed agreement, would add two new directors to its board. Mr. Musk and the company would pay tens of millions of dollars in fines, according to the people, who requested anonymity because they were not authorized to speak publicly. The negotiators planned to announce the agreement on Thursday after the markets closed.

But for Mr. Musk — an emotional, volatile and cocksure billionaire — the deal was unacceptable.

The settlement with the S.E.C. was a “neither admit nor deny” deal, meaning that Mr. Musk would not have acknowledged knowingly committing a violation. Mr. Musk, however, would not have been allowed to publicly state that he had done nothing wrong — and that was something he couldn’t accept, according to three people familiar with the talks.