The Justice Department yesterday accused the independent counsel prosecuting former White House aide Michael K. Deaver of attempting to coerce the Canadian government into waiving its diplomatic rights and requested a court order censuring the prosecutor and restricting his contact with Canadian officials.

The department's extraordinary pleading came two days after it was revealed that independent counsel Whitney North Seymour Jr. had made a second effort to get Canadian Ambassador Allan Gotlieb to testify during Deaver's forthcoming trial on perjury charges. The Canadian government formally protested that effort as a violation of international law aimed at forcing it to waive Gotlieb's immunity from having to appear in a U.S. court.

Yesterday the Justice Department joined in denouncing Seymour in a strongly worded, eight-page statement to U.S. District Court Judge Thomas Penfield Jackson, who is presiding over the Deaver case, and in a sharper statement by a top Justice Department lawyer.

The department called Seymour's request for Gotlieb's testimony "an attempt to intimidate" and said it had become "a significant irritation in relations between the United States and Canada."

Jackson, who in June blocked Seymour from subpeoanaing Gotlieb or his wife, Sondra, was urged to direct the prosecutor to send any future communications to Canadian officials "only through diplomatic channels" and to admonish Seymour "to desist from any efforts to threaten, embarrass or punish the Canadian government."

Seymour declined to comment on the Justice Department's action. The case against Deaver, who left his job as President Reagan's deputy chief of staff in 1985 to become a lobbyist, goes to trial Monday.

In an Oct. 2 letter to a lawyer for the Canadian government, Seymour said that if Gotlieb did not agree to testify, the prosecution would be forced "to place much greater emphasis at trial on the unlawful acts engaged in by Deaver when he was working for the Canadian government . . . . "

Acting Assistant Attorney General James M. Spears said in a statement yesterday the Canadians "quite understandably view this as an attempt to to intimidate . . . . "

Despite the harsh tone of both the statement and the court pleading, the Justice Department did not request a date for a hearing and may not seek one, a department spokeswoman said.

Deaver is charged with five counts of lying to a congressional subcommittee and a federal grand jury about the contacts he made with top administration officials on behalf of his lobbying clients.

One of those clients was the Canadian government, which hired Deaver to advise it on the U.S. government's policy on acid rain. Seymour has contended that Deaver lied when he said he had no knowledge of meeting with Gotlieb while he was still at the White House.