President Bush announced yesterday that he intends to nominate Robert S. Mueller III, who now advises Attorney General Dick Thornburgh on criminal matters, as the new head of the Justice Department's criminal division.

Mueller, 45, has served as an assistant to Thornburgh overseeing criminal matters since May 1989. He would replace Edward S.G. Dennis Jr., who announced yesterday he is leaving the department to join a Philadelphia-based law firm at the end of August.

Before he joined Thornburgh's staff, Mueller was a partner at the Boston law firm of Hill & Barlow. He previously spent four years as a prosecutor for the U.S. attorney's office in Boston, including one year as a court-appointed U.S. attorney, and six years as a prosecutor for the U.S. attorney's office in San Francisco.

Dennis, who became head of the criminal division under President Ronald Reagan, said in a statement yesterday that his decision to resign "is based on family considerations and my feelng that I will not be a complete lawyer until I succeed in the private practice of law."

Dennis praised Thornburgh for "outstanding leadership" in his letter of resignation.

The change at the top of criminal division is the fourth major personnel shift at the department in six weeks. Thornburgh's top deputy, Donald B. Ayer, resigned last month and was replaced by William P. Barr.

Thornburgh's two closest aides, executive assistant Robert S. Ross Jr. and press secretary David R. Runkel, were also reassigned to less sensitive posts with the department.