NEW YORK, JUNE 12 -- In a packed federal courtroom here today, one of Wall Street's most prominent law firms tried to cleanse away the taint of a notorious client.

Insisting that it had been unfairly tarred by its representation of former stock speculator Ivan F. Boesky, the law firm of Fried, Frank, Harris, Shriver & Jacobson argued that a $338 million lawsuit accusing the firm of fraud should be dismissed.

"Something more must be shown . . . before any defendant, let alone a lawyer, should be hauled before a court," said Henry King, the attorney representing Fried Frank.

King was referring to allegations in a civil suit filed by investors in a Boesky partnership. The investors charge that Fried Frank and others withheld information about Boesky while helping him raise money last year. Boesky also is a defendant in the lawsuit.

In November, Boesky paid the government $100 million to settle charges that he traded stocks on the basis of inside information about corporate takeovers. He later pleaded guilty to a related criminal charge.

Boesky raised about $1 billion in 1986 to invest in the stocks of companies involved in takeover events. About $660 million was raised through the sale of bonds by Drexel Burnham Lambert Inc.; the rest was contributed by the investors who are now suing Boesky, Fried Frank and others as part of an effort to recover their investment.

The suit has garnered attention not only because it parallels an ongoing federal grand jury investigation into Wall Street corruption, but also because the investors' lawyers broke an unwritten rule of New York's close-knit legal fraternity by naming Fried Frank as a defendant.

It is traditional among lawyers here and elsewhere to refrain from suing one another. Before the case was filed, Fried Frank negotiated with many of the investors in an effort to dissuade them from naming the firm in their allegations, but many of them, who were represented by the law firm Cadwalader, Wickersham & Taft, decided to sue Fried Frank.

At today's dismissal argument, King emphasized that the partnership investors had not claimed in their suit that Fried Frank knew its client was engaged in deeply corrupt stock trading practices.

But Judge Milton Pollock questioned the firm's role in soliciting funds for Boesky. Referring to allegations that Fried Frank partner Stephen Fraidin, Boesky's longtime attorney, directly encouraged at least one investor to join the partnership, Pollock asked, "Wasn't the lawyer stepping out of line in becoming a securities salesman?" Adding that he hadn't "the slightest idea" whether any of the allegations against the firm are true, Pollock asked whether "a question" existed about to what extent the firm "investigated Boesky's skill and integrity."

King denied any wrongdoing by Fraidin or Fried Frank and called the allegations against the firm "the equivalent of guilt by association."

Not only do the investors allege that Fried Frank and others withheld information when funds were solicited, they also claim the firm had a conflict of interest when it agreed to represent Boesky in criminal matters. "They should have declined his representation in the criminal {matters} because they had obligations to the partnership," argued Pamela Chepiga, the investors' attorney.

Pollock reserved judgment today on whether to dismiss the complaints against Fried Frank, Drexel, and three others. But he indicated that he would deny a dismissal request by Boesky's accountants, Oppenheim, Appel, Dixon & Co.