Mayor Marion Barry's legal counsel has written to the Justice Department suggesting that a special prosecutor determine if U.S. Attorney Joseph E. diGenova has been involved in "illegally leaking information" from a federal grand jury investigating alleged drug use by D.C. employes.

In a letter to Attorney General William French Smith, legal counsel Herbert O. Reid Jr. noted several news stories about the grand jury's activities, including one in The New York Times, which said Barry is the subject of a perjury inquiry.

"These several instances of 'pre-trial publicity' have so infected the grand jury process as to nulify the grand jury's usefulness," Reid wrote.

DiGenova, reached last night, declined to comment.

Barry testified before the grand jury in January about Karen K. Johnson, a former city employe and friend of the mayor who has since been convicted of selling cocaine.

Barry has denied using or buying cocaine or having knowledge of Johnson's involvement with drugs.

"In light of the possible personal involvement of the United States District Attorney for the District of Columbia in the process of illegally leaking information from a current grand jury, it may be necessary to make a decision as to the appropriateness of your referring this matter to a special prosecutor to determine whether there has been misconduct on his [diGenova's] part," Reid said in his letter to Smith.

Reid did not say on what he based the charge that the U.S. attorney has "possible personal involvement" with the information in the news stories.

Reid's letter is the latest salvo in a new offensive being taken by the mayor on the drug investigation. Barry has likened the probe to past lynchings of blacks and to the political "witch hunts" of the McCarthy era.

He said this week that the Times article was timed by Reagan administration officials to coincide with the unity meeting between black leaders and Democratic presidential nominee Walter F. Mondale to embarrass them.

Barry continued on the offensive in a taped television interview with talk show host Larry King in which the mayor said his administration is not in trouble and he is stronger than ever politically.

"I'm politically in good shape," Barry said in a taped interview with Larry King, to be broadcast tonight on WJLA-TV, Channel 7. "My integrity is intact. My dignity is intact. My political organization is stronger than ever before.

"I'm not in trouble."

In the interview, Barry described his relationship with Karen K. Johnson as "social," and said he visited her to "drink a cup of tea, cognac -- something like that."

Three weeks ago, Barry authorized Reid to disclose that Barry had a close "personal relationship" with Johnson and visited her apartment "on and off" over a 12- to-18-month period that ended in the fall of 1982.

In an earlier interview this week with WJLA, Barry was asked if this was "an affair" and responded, "Of course not." But when he was reached last night, Barry refused to confirm or deny that the relationship was sexual.

Barry said last night that he visited Johnson socially and explained that she was "active in my 1982 campaign."

He said that he sometimes attended meetings at Johnson's apartment.

King, on a talk show to be aired at 7 tonight, asked Barry if his relationship with Johnson was over.

"It's been over. There never was much of one," the mayor replied.

To King's surprised reaction that he had read that it was "much of one," Barry laughed and said: "You read it in the printed media, didn't you? You've never heard Marion Barry say that, did you?"

Reid, in the original interview with The Post on the Barry-Johnson relationship, made it clear he was speaking for the mayor, and Barry had not suggested before that he disagreed with any of the characterizations in that or subsequent stories.

To the question of whether he would say the relationship was casual, he smiled and said: "I think so. Social, having a drink, drink a cup of tea, cognac -- something like that. Simple as that."

Barry told King that his wife, Effi, has been "a little bit upset by all these innuendoes." But he said he accepts what he called "life . . . in a fishbowl."

The mayor said the investigation has not hampered his ability to manage the city.

"I don't think anybody in this town can say Marion Barry has known about illegal activity and not attempted to do something about it, or been involved in illegal activity," he said.

The current situation is better than it was in 1979 and 1980, when he was having trouble balancing the budget and people were demonstrating against him, Barry said.

"I was beleaguered," he said of those years early in his first administration.

"I hated to come to work some mornings. But every morning now, I get up, I can't wait to come to work."