Justice Department lawyers yesterday dropped a conspiracy indictment against former acting FBI director L. Patrick Gray III, conceding that they could not prove Gray had authorized illegal break-ins in search of fugitive members of the Weather Underground in the early 1970s.

Following a brief hearing in U.S. District Court here, Gray strode across the well of the courtroom and shook hands with chief prosecutor John W. Nields Jr., thanked him and said, "I know you were doing your duty and you did it well."

Moments later, outside the federal courthouse, Gray told reporters he had "every reason to believe this prosecution was malicious" and said a civil damage suit in his behalf against the federal government is under "extremely active consideration" by his lawyers.

Gray, 64, surrounded by his family, said he believes the government was "grossly negligent and derelict" in its investigation of the case. He declined to say whom be blamed for any malicious action or whether he thought his proseuction had been politically motivated. He did add that he believes the Justice Department's general effort to protect the constitutional rights of the citizens who were targets of the break-ins was "appropriate." In a prepared statement, which he read into a bank of microphones, Gray said he views the government's dismissal of his indictment as "complete vindication."

"Today my name is clear and I walk from this courthouse knowing that my long ordeal is over," Gray said.

In April 1978, a federal grand jury charged that Gray and two former high-ranking bureau aides, W. Mark Felt and Edward S. Miller, conspired to violate the civil rights of friends and acquaintances of fugitive Weathermen by authorizing surreptitious entries into their homes in New York and New Jersey in 1972 and 1973.

Felt, once the bureau's No. 2 man, and Miller, former chief of the powerful domestic intelligence bureau, were convicted by a jury on Nov. 6 of conspiracy after a lengthy and complex trial before Chief Judge William B. Bryant. Both are to be sentenced Monday.

In August, after Gray's lawyer, Alan I. Baron, challenged the strength of the government's key evidence, prosecutors made it clear the decision to move ahead with Gray's trial would depend on evidence brought out in the Felt-Miller case. The government acknowledged that a crucial witness against Gray had changed his story, leaving the case "substantially weaker."

Yesterday, prosecutors admitted they did not have the testimony they needed from either Felt or Miller and that without it, the evidence against Gray "did not warrant bringing his case to trail."

"The Felt-Miller trial has been completed. The case against Gray is unconvining," prosecutors said in submitting to Judge Bryant an order dismissing the indictment against Gray. Bryant approved the order and told Gray "you are discharged."

In court papers, the government noted that Felt, who took the witness stand in his own defense at his trial, testified he believed Gray knew nothing of the secret entries -- known in bureau parlance as black bag jobs -- which were the focus of the Weathermen case.

The government also cited yesterday Miller's testimony before a grand jury in which he said he thought Gray announced approval of such break-ins at a bureau conference in 1972 but that he was "not sure." None of the other persons who attended the conference could corroborate Miller's statement, the government said.