U.S. District Judge Aleta Trauger in Nashville, Tennessee said the publishers could not pursue a theory of "comprehensive general liability for infringement" against X, which Musk bought for $44 billion in Oct. 2022.
She dismissed two infringement claims, and dismissed a third claim for "contributory" infringement except for accusations that X did not properly police "verified" users and serial infringers, and failed to act on takedown notices fast enough.
Lawyers for the publishers did not immediately respond to requests for comment. Alex Spiro, a lawyer for X, declined to comment.
Sony Music, Universal Music and other members of the National Music Publishers' Association trade group had sued X last June, seeking more than $250 million of damages.
They accused X of routinely ignoring and encouraging copyright infringement, giving it a leg up on platforms such as Meta Platforms' Facebook, Google's YouTube and ByteDance's TikTok that properly license music.
The publishers also said the problem had gotten worse since Musk bought Twitter.
But in a 21-page decision, Trauger said X was not liable for direct infringement, reflecting the distinction in federal copyright law between active participants in infringement, and parties such as X that merely provide a platform for it.
She also said X was not liable for "vicarious" infringement, saying it was not responsible to police how posts were drafted or obtain copyright permission in advance.
"X Corp undoubtedly had some power over X/Twitter's users -the way that a company that provides a valued service always has power over the customers who rely on it - but that does not turn customers into even loose equivalents of agents or subordinates," Trauger wrote.
Music publishers represent copyrights for songwriters, not for songs themselves.