Linwood (Big Boy) Gray, the one-time alleged Washington heroin czar who acknowledged earning more than $300,000 in "fencing, loan sharking and bank robbing," repeatedly denied today that he had threatened to kill Washington attorney Kenneth M. Robinson over a bitterly disputed legal fee.

"I never threatened him," Gray said in federal court here. " . . . I never contacted [reputed professional killer] Gary Frazier or anybody else about putting a contract on Kenny Robinson."

Gray, 39, a muscular 250-pound man dressed in a beige three-piece suit, testified in the fourth day of the trial in which he is a defendant along with Harry L. Staley. Both are charged with conspiracy in the alleged death threats and in an attempt to avoid seizure of a house Gray owned in Prince George's County, sought by government agents for back taxes.

The house is the center of the dispute between Gray and Robinson. Gray hired Robinson, a flamboyant criminal trial lawyer, when Gray was arrested in 1979 on charges of evading taxes and operating as the kingpin of a $30 million Amsterdam-to-New York heroin ring.

Gray was acquitted of the "kingpin" charges, for which he could have been sentenced to life imprisonment without parole, but was convicted of tax evasion and sentenced to five years.

Robinson, providing a rare public glimpse of criminal defense fee arrangements and testifying under an unusual grant of immunity against possible tax evasion charges, testified that he agreed to a $75,000 retainer: $15,000 cash and the deed to Gray's fully paid house in Morningside.

Robinson said that he took out a $45,000 mortgage on the house, with the payments to be covered by $500-a-month rent from Gray's common-law wife, Darlene Fleming, who lived there while Gray was in prison.

Fleming failed to make the rent payments, Robinson said, and when he complained, Gray threatened to kill him. Robinson said he also learned that Gray had hired alleged professional killer Frazier to shoot him. (Frazier was slain in 1983 in what is an unsolved homicide.)

Driven by fear, Robinson said, he allowed Fleming to live rent free in the house and ultimately gave up the house to Staley, a Gray confederate and straw owner of the house.

Gray, shedding tears when he mentioned his wife and 6-year-old child, I'juan, gave a different version.

He said Robinson had told him that the retainer agreement was a phony but legal document designed to prevent goverment seizure of the house. In actuality, he said, Robinson took both the house and $80,500 in cash from Gray and was to "install them in a trust fund" for I'juan and borrow $45,000 on the house as his legal fee.

When two of Gray's codefendants from the 1979 heroin trial refused to pay a $10,000-to-$15,000 "bonus" Robinson wanted for his defense work, Gray said, the lawyer demanded rent from Fleming in the Morningside house instead, leading to an angry dispute, but no threats.