A Washington-area freelance writer was found dead in a Martinsburg, W.Va., hotel Saturday in the midst of investigating an eight-year-old politically charged dispute between the Justice Department and the Inslaw Co., a local computer software firm.

Daniel Casolaro was discovered in the Martinsburg Sheraton after telling friends that he was going to West Virginia to meet a source who had intimate knowledge of the Inslaw case. Hotel employees found the 44-year-old Fairfax man in a bathtub with his wrists cut, Martinsburg police reported.

Martinsburg police originally ruled the death a suicide but are now investigating it further, a spokesman said. An autopsy on the body has been ordered, the spokesman added, declining further comment.

Former attorney general Elliot Richardson, who is acting as counsel to the owners of Inslaw, said Justice Department officials told him they were conducting a separate probe into the death. A department spokesman was unavailable for comment.

The Inslaw case has been at the center of an intensive legal battle since 1983. Company owners Bill and Nancy Hamilton charge that the Justice Department stole $6 million worth of computer software from them that had been designed to help law enforcement officials track cases. Inslaw has alleged in court that department officials in the Reagan administration then used "trickery, fraud and deceit" and harassed the firm in an effort to drive it out of business. A House Judiciary subcommittee is investigating the case.

The Justice Department rejects the charges, however, and the case has been entangled in court for eight years.

Friends and relatives strongly suspect foul play, though they presented no evidence of it. They cited what they called the strange coincidence of Casolaro's death and the research into the controversial Inslaw case. "He had been researching this thing for a long time and was very excited about the information he was finally getting," said Benjamin Mason, a close friend of Casolaro's who met with him last Tuesday, the day before he left for Martinsburg. "He was in good spirits and very excited about the source he was going to see in West Virginia.

"There is no way in the world that he would have killed himself," added Mason, the last acquaintance to see Casolaro alive.

Friends say their suspicions have been piqued by several curious incidents, including a call to Casolaro's home Saturday night. Casolaro's brother, Anthony Casolaro, said a maid at Daniel's home answered the phone and heard a man's voice say: "You're dead, you bastard."

Casolaro began investigating the Inslaw case last year and planned to write a book about it. "He had been digging into stuff for months and getting nowhere," his brother said in a telephone interview. "Then, suddenly, he said he had this big breakthrough, some source he had. And now this."

Casolaro's friends have moved to protect materials that he had been gathering in the case.

Casolaro, an investigative reporter and writer, had published two novels, a book of short stories and several investigative articles. He was researching the Inslaw case as part of a book project on the "October surprise," the allegations that Reagan campaign officials in 1980 engineered the timing of the release of hostages from Iran to aid the GOP election bid.