Last year the Polish government approved a threefold increase in logging in the protected Bialowieza forest, home to bison and rare birds.
Unesco, EU officials and green activists protested against it.
The European Commission, which is taking legal action against Warsaw, asked the European Court of Justice to impose the provisional ban.
Environmental activist group ClientEarth welcomed the decision, saying continued logging would cause "serious and irreparable damage to this priceless natural environment".
The group's lawyer said: "In the history of the EU, emergency measures like this ban have only been used three times in nature conservation issues.
"So far there is no case in which an interim measure of the court was not respected. If Polish authorities do not follow that decision, it will be a serious conflict with the EU law."
Poland's Environment Minister Jan Szyszko says the logging could help to curb a bark beetle infestation.
The European Commission says it puts endangered species at risk.
If Poland loses the main ongoing case, it will be liable for multimillion euro fines.
The court will meet in a few months to determine whether the injunction will remain in place while the European Commission's case on the matter continues, a spokeswoman told the BBC.
The forest is a Unesco world heritage site that straddles Poland's border with Belarus.
Europe's top court has ordered Poland to immediately stop large-scale logging in Europe's oldest forest.