"Having mounted a public spectacle to put Twitter in play, and having proposed and then signed a seller-friendly merger agreement, Musk apparently believes that he — unlike every other party subject to Delaware contract law — is free to change his mind, trash the company, disrupt its operations, destroy stockholder value, and walk away," the complaint said.
The complaint also accused Musk of "a long list of material contractual breaches . . . that have cast a pall over Twitter and its business", including putting the deal on hold "pending satisfaction of imaginary conditions", breaching financing obligations and misusing confidential information.
The lawsuit contained pictures of numerous tweets in which Musk appeared to goad Twitter and its leadership, which its lawyers alleged violated an obligation in the agreement not to disparage the company.
The move sets the stage for a messy legal fight between Twitter and one of its most prolific and powerful users.
The company's lawyers have asked the court to fast-track a trial for September.
The lawsuit reveals how the deal between Twitter and Musk unfolded, starting with the 9.1 per cent stake he "secretly" built in March.
It said that Musk told Parag Agrawal, Twitter's chief executive, and board chair Bret Taylor that he had three options in mind: join the company's board, take over the business or start a competitor.
Musk was offered, and accepted, a board seat but days later changed his mind and made an unsolicited bid for Twitter, saying he would have to "reconsider my position as a shareholder" if his offer was not accepted.
In announcing his plans for Twitter, Musk promised to boost its flailing business, remove fake accounts from the platform and introduce a "free speech" ethos.
But on Friday, Musk announced his intention to walk away from the deal.
His team has disputed Twitter's estimate for the number of fake accounts, which stands at 5 per cent of users, and accused it of making "materially misleading representations" in its public disclosures.
In its lawsuit, Twitter dismissed the fake accounts claim and called Musk's reason for reneging on the deal "a model of hypocrisy".
Musk also texted Taylor in April to say that "purging fake users" could only be done if Twitter was a private company because "it would make the numbers look terrible", according to the complaint.
Some analysts have suggested Musk might be attempting to negotiate the deal at a lower price, given the rout in tech stocks, and that the parties could reach a settlement to avoid costly and protracted litigation. Musk did not immediately return a request for comment.
Twitter's lawsuit also alluded to speculation that Musk's offer to buy the company may have been a joke gone too far: "For Musk, it would seem, Twitter, the interests of its stockholders, the transaction Musk agreed to, and the court process to enforce it all constitute an elaborate joke."