From January next year, all airlines will have to buy permits under the EU's emissions trading scheme (ETS) to help cover the carbon cost of all flights that land or take off in Europe.
"EU legislation does not infringe the sovereignty of other states or the freedom of the high seas guaranteed under international law, and is compatible with the relevant international agreements," said the opinion from Advocate General Juliane Kokott.
While her opinion is not binding, the court's judges, who are expected make a final ruling early next year, usually follow an advocate general's guidance.
In turn, lawyers expect the London High Court of Justice, which referred the case brought by the Air Transport Association of America, American Airlines and United Continental to the Luxembourg court, to follow the ECJ's line.
The airlines took the case to the London court after Britain introduced national laws to implement the European directive.
Chinese and Indian airlines have also expressed vehement opposition to the EU law.
The 1997 Kyoto Protocol on combating climate change ruled countries should try to regulate aviation emissions through the industry body International Civil Aviation Organization (ICAO), but talks with the body have not yielded progress.
The European Union -- regarded as the vanguard of efforts to reduce planet-warming emissions -- therefore decided to include airlines in addition to factories, power plants and other installations in its carbon trading scheme.
The EU scheme sets a cap on the level of emissions allowed.
Utilities, factories and, from January, airlines that emit carbon above their cap have to buy carbon permits to cover these emissions. If they emit less than their limit, they can sell spare permits from their emission allowances.
European carbon prices gained as much as 2% on the news, two days after the permits touched a 31-month low of €9.82 ($13.13).
Airlines initially would only be required to pay for 15% of the carbon they emit, and would be allocated free allowances to cover the other 85.
Depending on decisions by airlines on how much of the cost they pass on to their customers, the European Commission has calculated that would result in a cost per passenger of between 2 and 12 euros ($2.66 and $15.96) -- much less than the penalty it would enforce on airlines that do not comply of 100 euros per allowance.
European Commission figures show emissions from airlines have doubled since 1990 and could triple by 2020, in contrast to emissions from most other sectors, which have been decreasing.
EurActiv with Reuters