D.C. Corporation Counsel John R. Risher Jr. announced yesterday that he will resign from office June 25 because he does not want his future actions as the city's chief lawyer to be clouded by the political overtones of the reelection campaign of his boss and close friend, Mayor Walter E. Washington.

Risher's 26 months in office have been punctuated by his efforts to upgrade the reputation of the city's legal staff, an unsuccessful and politically controversial effort to remove Sterling Tucker as chairman of the City Council and the dismissal of two of his own staff members for their refusal to pay fines for parking tickets that had been "adjusted."

The 38-year-old Washington native had developed a reputation around city hall as an ornately speaking, stiff, well-versed and no-nonsense lawyer who at times professed more adherence to legal and ethical canons than to what many considered the social and political demands of his office.

It was a combination of all these seemingly diverse factors that Risher cited yesterday in announcing his decision to step down from office.

"My intensely personal and loyal feelings for the mayor are well known," he said. "So, too, is my view that the actions of the corporation counsel should never be influenced by partisan political considerations nor the personal interests of any individual."

"I'm human. I have strong feelings for the man (Washington). I can't be absolutely sure that I would be able to run it (the office) without regard for those feelings," Risher said.

"But putting that aside, I can't expect that the world at large is going to say that I can divorce my feelings from the mayor's political ambitions, and I don't believe I should remain in office if I give rise to such misapprehension in the public."

Risher, who served as general counsel to the mayor's campaign organization in 1974, said he was not leaving the office to join the mayor's 1978 campaign staff. But he would not rule out working for the mayor if asked.

"Whenever Walter Washington wants John Risher, John Risher will be there," he said.

He also reaffirmed the belief he had stated during an interview with The Washington Post in March that the 63-year-old mayor should not seek reelection because he had been in office long enough. "I believe he deserves a rest and great accolades," Risher said yesterday.

Risher said he was not certain what would be his next job, but he would probably return to the law firm of Arent, Fox, Kintrer, Plotkin and Kahn - the firm he was with before becoming corporation counsel. Risher flatly denied that he was "jumping ship" in anticipation of an election loss by Washington.

Louis P. Robbins, 46, who has been Risher's top assistant since 1976, will be acting corporation counsel the mayor's office announced yesterday. Robbins, a Harvard Law School graduate and former partner in the firm of Grossberg, Yochelson, Fox and Beyda, also served as acting corporation counsel from 1975 to 1976.

Several confidants of the mayor said yesterday that Risher had not been forced out of office. Risher himself said that he had indicted to the mayor before being chosen corporation counsel in 1976 that he would not serve after 1978. He also stated that view to The Post in March.

But Risher, wearing a blue-and-white pin stripe shirt and polka dot tie of the same shades, and large gold cufflinks shaped into initials "JR," did say yesterday that he had advanced the date of his resignation from the fall to late June because of the mayor's political activity.

A few months after taking office, Risher began a series of high-profile court actions that set an activist, public-interest oriented tone for his office. As chairman of the city's commission that licenses doctors, he began proceedings to revoke licenses of six Washington physicians accused of improper practice, including abortionist Dr. Robert Sherman, who has since been indicted for murder.

He also launched a well-publicized investigation, of an alleged baby-selling operation at Washington Hospital Center, which did not result in any convictions for baby-selling. He ordered the school board to pay the $640,000 a Superior Court jury had awarded to a girl who was raped by a janitor in a city elementary school.