Joseph E. diGenova, U.S. attorney here for the past four years, yesterday submitted his resignation, effective March 1, and the D.C. law firm of Bishop, Cook, Purcell & Reynolds announced that the prosecutor would join the firm as a partner.

DiGenova, who has spearheaded investigations of District government officials including Mayor Marion Barry, made no public statement about his decision to leave his post as head of the largest U.S. attorney's office in the country.

But in his resignation letter to President Reagan, diGenova, 42, said he was "confident" that the U.S. attorney's office will continue to pursue "the work already under way, particularly the necessary effort against local public corruption."

Wayne S. Bishop, chairman of Bishop, Cook, Purcell & Reynolds, said discussions with diGenova had been going on for more than a month. "We are happy that he will be continuing his legal career with us," Bishop said.

He said diGenova would work in several areas of the firm's practice, including litigation, lobbying and international law.

There was no immediate indication of who might succeed diGenova or when that decision might be made. His successor would be nominated by the president and would require the approval of the Senate.

Sources said diGenova is expected to recommend that his principal assistant, Timothy J. Reardon III, be named as his successor. Reardon, a law school classmate of diGenova's at Georgetown University, has worked in the U.S. attorney's office for the past 16 years and has served as one of diGenova's top aides throughout histenure.

However, several other people -- D.C. Superior Court Judge Reggie B. Walton, assistant U.S. attorneys David F. Geneson and Edward E. Ross Jr. and deputy White House counsel Jay Stephens -- have been mentioned as possible choices. Walton and Stephens are both former assistant U.S. attorneys here.

Walton and Geneson said in interviews yesterday that they had not been contacted about the position and had no comment.

DiGenova's departure comes after the resignation of three top prosecutors in his office, Roger M. Adelman, Stephen R. Spivack and Mark J. Biros, to take positions specializing in white-collar crime at other law firms.

Bishop said diGenova's role in his firm would be broader than that, and would include helping corporate clients to "understand totally the ramifications of criminal statutes."

"He will bring to us the unique perspective and experience of a U.S. attorney and senior congressional aide," Bishop said.

Immediately before joining the U.S. attorney's office in February 1983 as principal assistant to then-U.S. Attorney Stanley S. Harris, diGenova served as administrative assistant to then-Sen. Charles McC. Mathias Jr. (R-Md.).

DiGenova's three-page letter of resignation mentioned some of the major cases his office has brought in the past four years, but gave credit for the office's accomplishments to the "career attorneys, federal agents and officers of the Metropolitan Police Department."

"These career attorneys are a national treasure; overworked, underpaid and too often unappreciated, they are the true heroes of this effort," diGenova said. "Their sacrifices and those of their families are an inspiring example of public service at its finest."

He also singled out for praise the victims and witnesses of crimes for showing a "willingness to participate in the process so that wrongdoers could be brought to justice."