Activists, rights groups and opposition parties in Spain have been hugely critical of the deal struck last month to try and rein in Europe's biggest migration crisis since World War II, joining a rising chorus of outrage on the continent.
"Mr. Rajoy is making us accomplices of this atrocity," Alberto Garzón, head of Izquierda Unida (IU), told reporters.
He said that refugees were fleeing from "terrorism" and "wars often directly provoked by Western countries... and by the Western military industry."
"At the doors of Europe, they come across a lack of solidarity and asylum, and detention camps that clearly violate human rights, international law, and the principles and values on which the European Union should have been built," he added.
Garzon's party on Thursday filed its complaint to the Supreme Court, accusing Rajoy and other European leaders of "having agreed with Turkish authorities to forcibly deport and transfer an unspecified number of people from EU territory."
According to lawyers for IU, this represents a crime against humanity under the Spanish penal code.
Hundreds of thousands of people - many of them from conflict-ridden countries like Syria and Iraq - have landed on Greece's shores over the past year after crossing over from Turkey in flimsy boats.
Brussels sought to tackle the problem by signing an agreement with Ankara last month to send new arrivals back to Turkey, in exchange for resettling some of the millions of Syrians living in refugee camps on its soil.
The deal has already contributed to a slowing of new arrivals, but it has been slammed by rights groups, the UN and even the pope, who used his Easter address to criticise the "rejection" of refugees.
On Wednesday, Rajoy was heavily criticised when he addressed parliament on the issue - Spain having welcomed just 18 refugees since the start of the crisis out of the 16,000 it promised to shelter under an EU relocation plan.
Rajoy, who is Spain's acting leader while bickering parties try to agree on a new government following inconclusive December elections, recognised the process was "very slow."