Joseph C. Sauerwein, the chief deputy prosecutor in Prince George's County, has left his post after he was charged Friday night in Ocean City, Md., with driving while intoxicated.

Sauerwein, 47, was arrested after witnesses reported a man slumped over the steering wheel of a car that was stopped--with lights on and motor running--in a main intersection along the Coastal Highway (Rte. 528), according to a spokeswoman for the Ocean City police.

He also was charged with resisting arrest, police said, but they could not provide details.

Sauerwein, who has been in the Prince George's state's attorney's office for 17 years, refused last night to discuss the arrest but said "the timing of the incident couldn't be worse."

He said he had previously told State's Attorney Arthur A. Marshall Jr. that he would leave his post and was taking accumulated leave prior to opening a private law practice next Tuesday.

Marshall said last night that Sauerwein had previously told him of plans to resign, and that last week Sauerwein chose July 29 as his last day. Sauerwein told him Monday that he would take accumulated annual leave until that time, Marshall said. "He thought it would be best to take annual leave."

Marshall said Sauerwein will remain on the state's payroll until July 29.

In October 1979, Marshall ordered an investigation of Sauerwein after The Washington Post reported that the chief deputy prosecutor, after an afternoon of drinking, was involved in two hit-and-run driving incidents the previous April but had not been charged in either.

Marshall said after the investigation that he had concluded that Sauerwein was the driver of a car that caused $1,200 worth of damage to a parked sports car and a pickup truck and then skidded off a Capital Beltway entrance ramp as it was being chased by the truck he had rammed.

Sauerwein paid the owners of both vehicles involved and persuaded them to sign statements that released him from liability.

Marshall suspended Sauerwein for four days and fined him $500. No charges were filed in the incidents.

Ocean City police said last night they went to 119th Street and Coastal Highway at about 10:30 Friday night in response to a report of an unconscious person there.

The intersection is close to several large condominium hotels and a small shopping center, according to police.

When police arrived, two witnesses told them said they had seen a man slumped behind the wheel of the car, its motor running and lights on, that was stopped in the middle of the intersection. Police said an unidentified nurse also had stopped and attempted to give the man first aid.

The man was found sitting on the steps of a nearby building, police said, and when officers approached him, he resisted them.

Sauerwein was released on personal recognizance several hours later, according to Sgt. Laura Healy of the Ocean City police.

She said she could not disclose if he was given a blood alcohol or breath test. Healy said she did not know if a trial date had been set.