D.C. Mayor Marion Barry announced yesterday he will replace People's Counsel Brian Lederer, who has won wide praise from consumer groups and the enmity of utilities as the aggressive public representative at utility rate hearings for the last six years.

Barry's decision comes at a time when Lederer has faced increasing criticism from utility companies and the Public Service Commission, which sets the city's utility rates.

Utility companies, which are legally required to pay the costs incurred by the people's counsel in rate cases, have charged that Lederer's litigation costs are excessive--a complaint he has said is part of a effort to undermine his office.

Barry gave no indication whether Lederer's battles with the utility companies were a factor in the decision to replace him. Barry praised Lederer for doing an "outstanding job representing consumers," but said it was time for "new blood" in the post. He declined to provide a more detailed explanation for his decision.

Frederick D. Dorsey, the principal deputy corporation counsel, was nominated by Barry to be the new people's counsel when Lederer's three-year term expires Oct. 10. Dorsey, who has served in the corporation counsel's office since 1982, has previously worked for the U.S. Equal Employment Opportunity Commission and the U.S. Commission on Civil Rights.

Spokesmen for consumer groups expressed shock and disappointment yesterday at the mayor's decision on Lederer. They said Lederer has been an effective advocate for consumers in proceedings before the PSC and that his departure comes at a time when several important issues are being considered by the commission, including an $82 million rate increase for 1984 being sought by the Chesapeake & Potomac Telephone Co.

"Dorsey comes in under a cloud of suspicion because the utility companies have been after the office of people's counsel for some time," said Jerome S. Paige, a member of the Consumer Utility Board, a citywide coalition of consumer and labor groups. The decision to replace Lederer "lends to the perception that Barry sold out to the large economic forces in the city," added Paige, who is also an assistant professor of economics at the University of the District of Columbia.

Spokesmen for C&P, the Potomac Electric Power Co. and Washington Gas Light Co. declined to comment on the decision.

City Council Chairman David A. Clarke said Barry is obligated to provide a more detailed explanation for his decision. "I think that when he removes somebody with what appears to be a good record he ought to state what the cause is," said Clarke.

Clarke said he would not make the same request for an explanation in the case of a change in city department heads or other members of the mayor's staff, but that the people's counsel is different because it is a quasi-independent post charged with being an advocate for the public.

Council member Betty Ann Kane (D-At Large), chairman of the council committee that will vote on Dorsey's nomination, said she was "very disappointed" that Lederer was not reappointed. Kane said Lederer was "the best people's counsel in the country" and had saved District utility ratepayers "millions of dollars."

Lederer issued a statement yesterday saying he respected Barry's decision to replace him and that he was proud of his work, adding: "We have shown that skilled public advocacy makes a difference in controlling utility rates."

Lederer's aggressive approach caused the assessments against utilities to rise sharply after he took office. For example, according to testimony presented to Kane's committee in July by Pepco, during the last year under Lederer's predecessor, Pepco's assessment was $57,000, but it jumped to $538,000 during Lederer's first year in office.

Earlier this this year, the PSC over Lederer's objection ordered him to refund $247,000 in assessments to Pepco because the commission decided that the funds were spent for allegedly irrelevant testimony in a rate case last fall.