The new law adopted by the Italian cabinet is likely to be challenged in the Italian courts, however.
It is also not clear whether the ECJ’s ruling takes precedence over Italian law.
Salvatore Curreri, a constitutional law professor at Enna Kore University, said he doubted whether the government’s action would save its Albania plan.
“The conflict with the European law – which is superior to the national legislation – remains, unless Italy wants to say European sources are not binding on this matter,” he told Reuters.
Carlo Nordio, the justice minister, insisted the new law was framed in a way “which a judge cannot fail to apply”.
He conceded, however, that appeals could be lodged with the Constitutional Court.
The new migrant facilities in Albania are currently empty – a first batch of 16 Egyptian and Bangladeshi migrants arrived last week but within days were brought to Italy as a result of the Rome court’s ruling.
The legality of the entire scheme will be tested again when the next batch of migrants are transported to Albania by the Italian navy.
More than 150,000 asylum seekers reached Italy last year, most of them from the coasts of Libya and Tunisia.
Ms Meloni promised to stop the boats when she was elected two years ago.
“We will continue to work tirelessly to defend our borders and to re-establish a fundamental principle: you can only enter Italy legally, following the rules and procedures established,” she said on Monday.