Michael K. Deaver, one of President Reagan's closest friends and former advisers, will walk into the federal courthouse here this morning for an appointment he first requested and then fought to avoid: a public inquiry into charges that he broke the law after leaving the White House.

Deaver's trial on five counts of lying to Congress and a grand jury about his lobbying business may lack the klieg lights and cameras of the Iran-contra hearings playing four blocks up the street, but it promises appearances by many of the same figures. Secretary of State George P. Shultz and former national security advisers Robert C. McFarlane and John M. Poindexter are among the likely witnesses.

The case, expected to last four to five weeks, will spin around a quintessential Washington story -- a tale of power, money and influence at the highest levels of the Reagan administration.

In an extraordinary court filing last week, independent counsel Whitney North Seymour Jr. said his case will expose the 49-year-old Deaver not to have been "a grand 'strategic planner' " for his clients, but an unethical influence-peddler who "traded on his personal relationships with high government officials and collected large fees for

a few ex parte telephone calls and meetings . . . . "

Deaver lied under oath not just to protect his well-placed friends, but in a frantic effort to make a $15 million profit from the sale of his then-flourishing lobbying firm, Seymour charged in the memorandum.

The former deputy White House chief of staff, who is the first person brought to trial by one of nine independent counsels appointed under a 1978 law, has said he is innocent of all five counts of lying. If convicted, Deaver faces a maximum sentence of 25 years in prison and a $34,000 fine.

Whatever the outcome of the trial, Deaver and his company, Michael K. Deaver & Associates Inc., have tumbled dramatically in the 14 months since he requested that an independent counsel be appointed to investigate his post-White House business dealings.

Most of his major clients have deserted the firm, which has exchanged its Georgetown office for a town house in Old Town in Alexandria. Deaver -- a Bakersfield, Calif., native who has been an associate of the Reagans since the president was governor of California -- has suggested in a sealed pleading that he may plead that his memory of the events in question was impeded by his abuse of alcohol and prescription drugs.

Those lucky enough to gain one of 100 seats inside U.S. District Court Judge Thomas Penfield Jackson's second-floor courtroom are expected to see two of the country's best-known lawyers square off against one another: Seymour, the patrician, Park Avenue lawyer, and combative Herbert Miller Jr., who gained fame representing former president Richard M. Nixon in his fight to regain control of the Watergate tapes.

At stake is more than Deaver's reputation. If Seymour -- a tall, 64-year-old lawyer given to plain-spoken courtroom rhetoric -- succeeds in convicting the former Reagan aide, it could strengthen arguments for extending the independent counsel law, enacted during the Carter administration, that has allowed courts to name private attorneys to investigate allegations of crimes involving top government appointees.

The law is due to expire later this year, and the Reagan administration and others have attacked it, saying it tends to create a costly special prosecutor, whose energies become focused on pursuing sometimes trival charges without being responsible to anyone.

Although a number of prominent officials -- among them President Jimmy Carter's chief of staff Hamilton Jordan, Reagan's former labor secretary Raymond J. Donovan and Attorney General Edwin Meese III -- have been investigated by court-appointed independent counsels, only two have been convicted as a result of their investigations. The convictions of conservative fund-raiser Carl R. (Spitz) Channell and public relations executive Richard R. Miller came recently after guilty pleas to charges filed by Iran-contra investigator Lawrence E. Walsh.

Seymour's inquiry also has faced difficulties. At the time of his appointment, his investigation centered on allegations that Deaver may have violated federal conflict-of-interest laws by lobbying with senior administration officials within a year of leaving office.

Deaver, however, was not charged with violating the conflict law, but with five counts of perjury and making false statements, leaving Seymour with the more difficult task of proving to a jury that the lobbyist knowingly lied to the House Energy and Commerce oversight subcommittee and to the Washington grand jury that was investigating him.

When Seymour failed in his effort to subpoena Canadian Ambassador Allan Gotlieb and his wife, he appeared to concede in court papers that he will have difficulty proving a portion of one charge: that Deaver lied to the grand jury about his contacts with Gotlieb. "There are no alternative witnesses" to a conversation between the Gotliebs and Deaver that is mentioned in the indictment, Seymour said in the pleading.

Seymour has shunned the media since his appointment May 29, 1986, but he fiercely has defended his inquiry in court papers, contending that the Justice Department unfairly accused him of spending too much money.

The inquiry has cost more than $500,000, but Seymour said that approximately $200,000 of that was spent in response to Deaver's "legal maneuvers and his unending discovery demands."

Although Seymour has adopted a low profile, he accused Deaver last week of "launching a public relations counteroffensive" at the same time. That effort included "elaborate denials that he did any 'one-shot,' 'quick fix' lobbying," Seymour said.

"Instead, Deaver falsely portrayed himself as a grand 'strategic planner' who was hired not for his connections to the First Family and the highest levels of the executive branch, but for his ability to engage in big-picture 'strategizing.' "