The trial of the suspected militants began at the national court, Spain's main hub for terrorism trials, and is expected to run for several weeks, Spanish media reports said.
The plot was foiled by anti-terrorist squad of the Madrid police in January last year after a series of raid carried out on Spain's second largest city of Barcelona.
The police got a whiff of the plot after a cell member, who was designated to blow himself up, developed cold feet and gave himself up to the authorities, the Barcelona Reporter newspaper said quoting the public prosecutor.
The prosecutor told the court that the plotters had chosen to strike the Barcelona subway system in revenge for presence of Spanish troops in Afghanistan.
The paper claimed that the accused, who have all pleaded innocence, had hatched the plot under inspiration from then Tehrik-e-Taliban chief Baitullah Mehsud, who was recently killed in a US drone attack in Pakistan's lawless Waziristan region.
As enough explosives were not found in the possession of the accused, they have only been charged with belonging to a terrorist organisation and not conspiring to stage a terror attack, the paper said.