Volkswagen AG’s emissions cheating spanned more than a decade and arose from deliberate efforts by dozens of employees to mislead regulators and consumers about diesel-powered vehicles, according to a lawsuit from New York’s top law-enforcement official.

The decision to use software to manipulate emissions tests traced back as far as 1999, when engineers at the company’s Audi luxury unit developed technology to quiet diesel vehicles, according to a lawsuit filed Tuesday by New York Attorney General Eric Schneiderman. The...