The ruling may force the Polish government to return excise tax paid since the country's entry into the EU in 2004 until December last year, when the tax regulation was amended.
"Those that have paid these excessive duties ... they have the right to claim reimbursement," European Commission spokeswoman Maria Assimakopoulou told a news briefing.
The Polish tax was partly meant to curb soaring imports of cheap second-hand cars from Western Europe which harmed domestic sales of new vehicles.
The Luxembourg-based European Court of Justice said it was illegal under EU laws for Poland to levy higher excise tax on imported cars older than two years than on vehicles already registered in the country.
For cars older than seven years, the tax reached 65 percent of the car's value.
The court was ruling on the case of Maciej Brzezinski, who had to pay the tax on a Volkswagen Golf manufactured in 1989 that he brought to Poland.
Poland amended the law in December so that excise tax on cars did not depend on the vehicle's age or on whether it was imported.
Poles have imported nearly 2.5 million second-hand cars since 2004, paying excise tax of about $835 million (2.5 billion zlotys), the finance ministry said on its Web site.
Assimakopoulou noted that the Commission, the EU's executive body, had opened legal action against Hungary, Denmark, Cyprus and Finland, saying their car taxes were incompatible with EU rules.
The action -- called an infringement procedure, which can end up in the European Court of Justice -- may also be launched against EU newcomer Romania, she added.
EU finance ministers are due to discuss possible harmonization of car tax rules in May, she said.