Defeated in the courts, Ian Hamilton is seeking to salvage his ill-fated biography of J.D. Salinger by enlisting the aid of a much more cooperative subject: himself. In May, Random House will publish Hamilton's "In Search of J.D. Salinger," which now features the lawsuit-scarred biographer as the hero of his own book.

This new version -- the book's second rewrite -- seems likely to remove any possibility of legal trouble by tossing out most if not all excerpts and paraphrases from Salinger's letters. In October, the Supreme Court let stand a federal appeals court ruling that quashed publication of the book, then titled "J.D. Salinger: A Writing Life." Salinger, reclusive author of the classic "Catcher in the Rye," had successfully contended that Hamilton's use of the letters violated his copyright.

Salinger's lawyers would not comment yesterday. Hamilton could not be reached. (His London answering machine, however, provided a number if you wished to rent an apartment.) But in a statement released by Random House, Hamilton was quoted as saying: "The first version was a fairly conventional biography, connecting the work to what could be discovered of the life ... The new version is a different sort of book altogether -- more of a literary adventure story, with the biographer as a leading character."

In addition, Hamilton said, the revised book "raises key questions about the whole business of 'biography' -- what it is for, why do we write it, why do people want to read it and so on."

That is a subject Hamilton and Salinger have discussed before. In their 1983 exchange of letters, Salinger wrote that "it has always been a most terrible and almost unassimilable wonder to me that it is evidently quite lawful, the world over, for a newspaper or publishing house to 'commission' somebody, in the not particularly fair name of good journalism or basic profitable academic research, to break into the privacy not only of a person not reasonably suspected of criminal activity but into the lives as well, however glancingly, of that person's relatives and friends."

Jason Epstein, editorial director of Random House, was traveling yesterday and couldn't be reached for comment. However, the Random House press release quoted him as saying, "I have felt from the beginning that literary biography is a legitimate pursuit and that Salinger is a legitimate subject." His statement somewhat gloatingly added that the outcome was "an even better book than Mr. Hamilton had originally written."

Actually, this presumably final version was also nearly the first version. In a 1986 interview, Hamilton told Publishers Weekly that his initial inclination was to write about a biographer in search of his subject.

Part of the story, he told the magazine, "would be what happened when one set out to write a book about somebody who didn't want a book written about him, what the limits would be, how far it would be proper to go."

Instead of doing that, however, he wrote a straightforward, respectful, brief biography. Hamilton restricted himself to talking about the 30 years Salinger was publishing stories and books, and tried "as far as possible to play along with his wishes."

Those who saw advance versions called the book tame and relatively uninformative. Hamilton, for example, turned up few hard facts on Salinger's brief first marriage -- not even the wife's family name. Salinger himself said that, if you discounted his letters, the book was "lifeless and uninteresting."

News of the newly recast biography, while apparently a well-guarded secret in the New York publishing world, was recently disclosed in the English and Canadian press. In a Jan. 30 interview with The Toronto Star, Hamilton maintained that he still admired Salinger, adding, "It's too bad that in his eyes I've become that hated person."

Hamilton has also run into difficulties with officials of several university libraries who say he violated agreements not to quote from their collections of Salinger letters.

"His behavior was just a disregard for our policies, which state quite clearly that permission to examine materials did not include permission to quote from them," says Cathy Henderson, the research librarian at the Harry Ransom Humanities Research Center at the University of Texas at Austin. "As a professional, it makes me unhappy that our rights as owners of the physical originals were so cavalierly dealt with."

Salinger spent a good deal of money suing Random House, and seems to have wrestled the publisher to a draw. Even if this rewrite should clear all copyright hurdles, Salinger is still seeking damages stemming from the earlier versions of the book. And if any future biographer gets the urge to write about Salinger, he will no doubt lie down until the feeling goes away.