The Tesla boss agreed to pay a fine of $20m (£15m) to the Securities and Exchange Commission regarding a tweet he had written boasting that he had funding to take his firm private.
The SEC had alleged that Musk did not have the estimated $25-50bn needed to make that deal happen.
After initially refusing an offer to settle the case, Mr Musk backed down, agreeing that he and his company would each pay a $20m fine, he would step down as Tesla’s chairman (but remain chief executive), and that he would allow oversight of his communications about company news.
But in a tweet late on Thursday, Mr Musk described the SEC as the “Shortseller Enrichment Commission”, saying it was doing “incredible work”.
Mr Musk, 47, has long had a hatred of shortsellers – investors who have been betting on a fall in Tesla stocks.
Later, he re-posted a tweet he had written in 2012, saying: “That said, even though they cause me grief, I would defend the right of shorts to exist. They are often unreasonably maligned.”
He then replied to it, writing: “The last several years have taught me that they are indeed reasonably maligned.
“What they do should be illegal.”
The SEC did not comment on Mr Musk’s tweets, nor did Tesla. Tesla shares were down 3.1%.
Peter Henning, a Wayne State law professor who was formerly an SEC attorney, said: “It certainly shows his pique at having to settle.
“This isn’t something you would expect from a mature corporate leader, but he is clearly still angry and was probably reluctant to settle.”
The settlement still needs approval from the courts.
The SEC, Mr Musk and Tesla must file documents later this month to prove the terms are “fair and reasonable”.
Mr Musk’s tweet, however, could give a judge reason to believe he will not change his behaviour.
Separately, he is being sued by a British diver who helped rescue boys trapped in a Thai cave after the Tesla chief called him a paedophile.
Vernon Unsworth claims Mr Musk defamed him with “unlawful, unsupportable and reprehensible accusations”, according to court documents filed in California and seen by Sky News.