DETROIT  For the last two months, as scandal swirled on and on, residents here knew that their mayor, Kwame M. Kilpatrick, was under criminal investigation. Still, when a county prosecutor announced charges against him on Monday, Detroit was left reeling at the scope and seriousness of them.

Mr. Kilpatrick, 37, was charged with eight felony counts, including perjury, obstruction of justice, conspiracy to obstruct justice and misconduct in office. He turned himself in to the authorities just after 5 p.m., and was released on his own recognizance. He has vowed not to resign.

The prosecutor, Kym L. Worthy, painted a portrait of a mayor who had lied under oath, fired a police official and agreed to pay $8.4 million in taxpayer money to settle lawsuits  all to prevent the public from learning of his personal entanglements, including a romantic relationship with his former chief of staff, Christine Beatty.

Emphasizing that her investigation of Mr. Kilpatrick, who is married and has three sons, was not a private question of “lying about sex,” Ms. Worthy said: “Public dollars were used, people’s lives were ruined, the justice system was severely mocked, and the public trust trampled on. This case is about as far from being a private matter as one can get.”