The satirical weekly Charlie-Hebdo was due to publish on Wednesday 12 cartoons originally printed by the Danish paper Jyllens-Posten which have caused outrage in the Muslim world.
"This is good news to us all," Charlie-Hebdo editor Philippe Val told reporters after the ruling.
"We are defending the principle of the right for caricature and satire."
The judges rejected demands by French Muslim organisations, including the French Council of Muslim Faith (CFCM) and the Grand Mosques of Paris and Lyon, which had argued the paper was undermining the principle of the respect of faiths.
The court did not rule on the contents of the claim, but rejected it on a technicality, saying the plaintiffs had failed to follow several points of procedure in filing their suit.
Sources at Charlie-Hebdo said the weekly's offices and some staff had been placed under police protection ahead of Wednesday's publication, which will also feature a cartoon of Prophet Muhammad burying his face in his hands and saying: "It's hard to be loved by fools".
The cartoons, reprinted by several French and other European papers, have provoked a deepening crisis between Europe and the Muslim world.
Afghan police killed four protesters on Tuesday in some of the worst violence to erupt over the cartoons, one of which showed the Prophet Muhammad with a turban resembling a bomb.