The prosecutor has argued that the High Court has the jurisdiction to open the probe because the scandal is “a national affair that affects hundreds of thousands of people”, a judicial source told AFP on Monday.
It has alleged that the company possibly committed the crimes of fraud, violation of consumer protection norms and attacks against the environment, the source added.
Nearly 684,000 diesel cars of the Volkswagen brands – VW, Audi, Skoda and Seat – have been sold in Spain in recent years fitted with the pollution-cheating software, according to VW's Spanish unit.
A small public sector workers union, Clean Hands, has filed a private criminal complaint against Volkswagen in Spain as has an international association for the defence of people who bought cars fitted with the software.
Clean Hands has lodged criminal complaints in most major cases of political and corporate corruption in Spain in recent years.
French prosecutors last week launched a preliminary investigation into possible fraud over the Volkswagen scandal, adding to a raft of judicial probes worldwide, including the United States, Italy and Germany itself.
EU authorities are also pushing for an EU-wide investigation amid claims several governments had long been aware that something was wrong.
Volkswagen sparked global outrage last month when it admitted that 11 million of its diesel cars worldwide were equipped with so-called defeat devices that activate pollution controls during emission tests but turn them off when the car is on the road.
Volkswagen has already said it will set aside €6.5 billion in provisions in the third quarter but the company's new chief executive Matthias Mueller has acknowledged this was just the start as it only covers the estimated cost of fixing the vehicles.