The recall affects 2009-2014 Jettas, Beetles, Audi A3s and Golfs, as well as 2014-2015 Passats.
"Using a defeat device in cars to evade clean air standards is illegal and a threat to public health," said Cynthia Giles, assistant administrator for the Office of Enforcement and Compliance Assurance.
The move, which could cost the automaker up to $18 billion, comes as the EPA takes a more aggressive stance on targeting the auto industry to enforce the Clean Air Act.
In 2014, the EPA fined Korean automakers Hyundai Motor and Kia Motors $300 million for misrepresenting the fuel economy in 1.2 million of their cars. So far, that is the regulator’s highest settlement with an automaker.