Joseph J. DiMona, 77, a best-selling novelist and nonfiction ghostwriter for such well-known figures as president Richard Nixon's aide H.R. Haldeman and former Los Angeles County coroner Thomas Noguchi, died of liver cancer Nov. 6 at his home here.

Mr. DiMona's was an eclectic and successful writer whose best-known collaborations were on Haldeman's "The Ends of Power" in 1978 and Noguchi's "Coroner" and sequel "Coroner at Large" in the mid-1980s.

Unusual among ghostwriters, Mr. DiMona's name was known and he made money. He insisted on shared credit and 50-50 profits and said that he made $500,000 on the Haldeman book alone.

Ghosting "The Ends of Power," which was criticized for poor organization, was not as great a coup for Mr. DiMona as gaining Haldeman's confidence in order to get the job done.

A proven writer, Mr. DiMona was hired by the publisher to assist Haldeman, Nixon's chief of staff, who served time in federal prison for his involvement in Watergate. But Haldeman was reluctant to open up to the writer.

Then, in 1977, Mr. DiMona's novel "The Benedict Arnold Connection," which is about nuclear terrorism, was published, and Haldeman liked it, particularly what the former Nixon aide viewed as Mr. DiMona's political savvy.

Ironically, it may have been an earlier DiMona novel, "Last Man at Arlington," about the John F. Kennedy assassination, that initially had soured Haldeman on his ghostwriter. The book's heroine spoke fondly of the Kennedy years and added, "With Nixon as president, it makes you sick to say you are an American."

Coupled with televised post-Watergate statements by Nixon, Mr. DiMona's terrorism novel prompted Haldeman to talk volubly and to share notes of Nixon conversations he had forgotten he had. Mr. DiMona's job got a lot easier.

Never flustered by literary criticism of the Haldeman book, Mr. DiMona told one interviewer: "You don't write anything for Haldeman. He changed my book right down to the end. He rewrote, revised, edited for five drafts. He's very meticulous."

Mr. DiMona, a lawyer by training, enjoyed criminal trials -- and covered the Watergate trial of former attorney general John Mitchell and former commerce secretary Maurice Stans for New York magazine.

Mr. DiMona's novels focus on terror, suspense and intrigue, and he had some background in writing for show business. So it was not surprising that the writer and Noguchi, self-styled "coroner to the stars," found each other.

The Noguchi books, knowledgeable critics felt, were mostly a rehash of public files about the county's many celebrity deaths, including those of Sen. Robert F. Kennedy, Marilyn Monroe, Janis Joplin, John Belushi, Natalie Wood and Sharon Tate. Nevertheless, the Noguchi books and spinoff contracts for serialization and foreign publication were successful.

Mr. DiMona, a New Jersey native, was a graduate of Duke University and George Washington University law school. He served with the Navy in the Pacific during World War II.

Survivors include his wife, two children and a brother.