The law firm of Covington & Burling yesterday withdrew as defense counsel for former Youth Pride Inc. director Mary Treadwell after the firm discovered that its lawyers previously handled a civil lawsuit against Treadwell.

The suit involved the same Pride real estate spinoff that is the focus of a federal indictment against Treadwell. Covington partner Peter J. Nickles said the ongoing suit raises "obvious ethical problems" that require him to leave the case.

Nickles had informed U.S. District Court Judge John Garrett Penn Tuesday that he would act as Treadwell's court-appointed lawyer. His decision means Penn will have to resume a search for a law firm willing to take on the complex criminal case against Treadwell.

Treadwell, three other officials of the real estate spinoff, P.I. Properties Inc., and an accountant were indicted in February on charges that they conspired to defraud the government and low-income tenants of thousands of dollars in federal housing funds between 1974 and 1978 by using P.I. Properties to obtain government money which they used for personal expenses and profit making ventures.

That government money, according to the indictment, was intended for tenants at the Clifton Terrace Apartments, which was owned by P.I. Properties, and at two other projects managed by the company.

The case that caused Covington to withdraw as Treadwell's lawyers was brought several years ago in behalf of tenants who lived at the Kenesaw Apartments, in Northwest Washington, which was managed by P.I. Properties.

In a letter delivered to Penn's chambers yeterday, Nickles said that earlier case was handled by Covington lawyers who were temporarily assigned to work in the Neighborhood Legal Services program.

The accountant named in the indictment, Ronald S. Williams, pleaded guilty to a lesser charge Tuesday and has agreed to testify for the prosecution. In exchange for his cooperation, the government has said it will dismiss the charges in the indictment against Williams, who is Treadwell's estranged husband.

Johnny Mickens III, who was a key financial adviser to Treadwell, has also pleaded guilty and agreed to testify for the government. The former bookkeeper for P.I. Properties has also talked to the prosecution.

Treadwell, and the three remaining defendants, Robert E. Lee, Joan M. Booth and Charles W. Rinker Jr. have pleaded not guilty to the charges.

Treadwell, who has insisted that she cannot afford to pay for extensive legal help she needs to defend herself against the charges, could not be reached for comment yesterday. Penn, after examining Treadwell's financial statements, said that she qualified for a lawyer appointed and paid for by the court.