Kenneth M. Robinson, a flamboyant Washington defense lawyer, is accustomed to the high drama of criminal court trials where for years he has represented the capital's high rollers from international dope dealers to former South Carolina congressman John Jenrette.

But things were different in federal court here today. Armed with an unusual immunity agreement against possible income tax evasion charges, Robinson quietly waited to testify against a former client, Linwood (Big Boy) Gray, onetime alleged heroin kingpin in Washington. Gray is on trial on charges of concealing his assets from seizure by government tax agents and threatening to kill Robinson in a dispute over legal fees.

The trial opened before U.S. District Court Judge Joseph H. Young with attorneys for Gray probing into the murky world of criminal defense fees and contending that it was Robinson, not Gray, who concealed thousands of dollars in Gray's assets from the government -- and for himself.

Kathleen Gallogly, one of Gray's two attorneys, told the jury of six women and six men today that an Internal Revenue Service audit of Robinson's books showed Robinson underreported his income by more than $81,000 in 1981 and possibly additional amounts in other years. Robinson is expected to testify Friday.

"Kenneth Robinson should not be an immunized witness," Gallogly said in opening arguments. "He should be sitting behind that table as a defendant."

Robinson, she said, accepted immunity in exchange for testifying against Gray because he faced possible criminal prosecution and disbarment.

With his grant of immunity, Robinson' credibility "should be on trial," Gallogly said. On the other hand, she acknowledged Gray "is not a model citizen" but urged the jury to keep in mind the adage, "even a prostitute can be raped."

Prosecutor David B. Irwin painted a different picture. Gray, convicted in 1979 of tax evasion but acquitted of masterminding a $30 million Amsterdam-to-New York heroin ring, owed Robinson $75,000 for representing him in the case, Irwin said. He paid Robinson $15,000 cash and deeded his Prince George's County home, valued at $60,000, to Robinson for the balance, Irwin said.

Robinson took out a new $45,000 mortgage on the house, Irwin said, and Gray's common-law wife, Darlene Fleming, was to pay Robinson $500 a month rent to cover his mortgage payments. She stopped paying rent, Irwin said, and when Robinson complained to Gray, now in prison, Gray threatened to have Robinson and his family killed.

Robinson was forced ultimately to give the house to a Gray confederate, Harry L. Staley, who acted as a nominee, or straw, to conceal Gray's interest in the house, Irwin said. This in turn frustrated efforts by the Internal Revenue Service to seize the house in partial compensation for the $478,000 prosecutors say Gray failed to report in illicit heroin income in the late 1970s. Staley, a Washington insurance executive, is a codefendant with Gray in this trial.

Both Gray and Staley have denied all charges. Gallogly told the jury Robinson instructed Gray to conceal not only his home but also about $80,000 in cash from the IRS by allowing Robinson to hold them. Robinson took the $45,000 mortgage on the house as his fee, she said. The $80,000 in cash was placed in a trust, she said, for the education of Gray's 6-year-old son, I'juan, and the income from the trust was used to pay the note on Robinson's mortgage.