U.S. District Judge S. James Otero ruled the tweet at the center of Daniels' lawsuit was "rhetorical hyperbole," which is protected by the first amendment, rather than defamation.
"Mr. Trump's tweet served as a public rejoinder to allegations made by Plaintiff," Otero ruled. "If this Court were to prevent Mr. Trump from engaging in this type of 'rhetorical hyperbole' against a political adversary, it would significantly hamper the office of the President."
Otero also ordered Daniels to pay Trump's legal fees for the suit.
Daniels, whose legal name is Stephanie Clifford, filed the suit in April alleging an April 18 tweet in which Trump said the sketch was a "total con job" constitutes an accusation that she fabricated a composite sketch of a man who allegedly threatened her and resulted in her being exposed to ridicule and violent threats.
Daniels' lawyer Michael Avenatti tweeted that he had filed an appeal against the ruling with the Ninth Circuit court.
She and Avenatti also filed a lawsuit against Trump and his former personal attorney Michael Cohen over the $130,000 payment made to prevent her from speaking publicly about her alleged affair with Trump.
Avenatti said Daniels' other claims against Trump and Cohen would proceed unaffected after Monday's ruling.