A federal court judge in Los Angeles set an Oct. 22 trial date in a Friday court filing that rejected Musk's attempt to dismiss a defamation lawsuit filed by British diver Vernon Unsworth.
Musk contended his insult was protected from legal action, but the judge overseeing the case disagreed.
Unsworth is seeking more than $75,000 in damages from Musk, a multibillionaire. The suit also seeks a court order prohibiting Musk from making any further disparaging comments.
This is the second time in less than a year that Musk's free-wheeling comments on Twitter have saddled him with legal headaches.
Last year, Musk and Tesla reached a $40 million settlement of allegations that he misled investors with a tweet declaring he had secured financing for a buyout of the electric car maker. He then had to go to court earlier this year to defend himself against assertions that he had violated an agreement with the Securities and Exchange Commission about his tweeting.