A federal jury acquitted Linwood Gray yesterday of charges that he directed a $30 million international heroin-smuggling ring in Washington. The jury convicted Gray, however, of income-tax evasion.

Gray, a burly, 250-pounder, sank into his chair as courtroom clerk Sophie Lyman read the first "not guilty" verdict on the drug charges against him. A female friend of Gray sobbed loudly and was led from the heavily guarded courtroom by marshals.

Gray's attorney, Kenneth Michael Robinson, said later that Gray was "pretty happy" with the verdict and reiterated his contention, made during trial testimony, that Gray was framed by a prosecution that got "out of hand."

Prosecutors and drug agents, who had described Gray in trial testimony as the largest single source of heroin in Washington for the last three years, expressed frustration and bitterness at the verdict.

U.S. Attorney Carl S. Rauh called the verdict "extremely disappointing and unfortunate."

Assistant U.S. Attorney Barry Leibowitz, who worked on the case for 1 1/2 years and was shot outside the federal courthouse last year in anunsolved assassination attempt, said: "I spent seven years of my life trying to rid this city's streets of crimes, and I'm the one who's attacked in the courtroom" $&(WORD ILLEGIBLE

U.S. Chief Judge William B. Bryant rejected a request from Robinson to release Gray on personal bond and set sentencing for the tax charges for Aug. 17.

The jury also acquitted two other defendants, Carl Cathey Jr. and Joseph F. Wilson, of drug charges. Three men and a woman were convicted of bringing or helping to bring heroin into the United States.

Prosecutors and drug agents had described Gray as the iron-fisted king-pin of a complex narcotics organization that he kept in line with murders and shootings.

Gray testified that he abhorred drugs and that his huge income over the last three years actually came from more than $300,000 in bank robbery loot.

The defense contended that the real drug kingpin in charge of smuggling heroin into the country was Bob (Nighthawk) Terry, a radio disc jockey who has been missing for two years.

The government never offered physical evidence that Gray had personally handled the drugs in any international conspiracy, and conceded it has no evidence that he had ever been overseas.

On taped transaction involved a government informant to whom Gray gave $50,000 to purchase drugs in Amsterdam. Gray admitted he made that transaction, but said it was all a ruse to get the government informant - a drug dealer who he did not know was working for the government at the time - to obtain evidence to prove that Terry was in Amsterdam.

Jurors, who could not be reached for comment because the judge ordered their names sealed, did not hear evidence about the shooting of Leibowitz, or the five murders and two other shootings that government investigators link to the drug-smuggling ring. Judge Bryant ruled that material was too prejudicial since no formal charges have been filed charging any violence.

One of the original defendants in the case, Robert L. Stuckey, told the judge in midtrial that he intended to claim in his own defense that he participated in the drug ring because he was afraid of Gray.

Stuckey was granted a separate trial after he told Bryant the nature of his defense. The records of Stuckey's allegations were sealed.

Members of a special federal-D.C. narcotics task force considered the evidence against Gray the strongest they could obtain.

At least four couriers who smuggled heroin into the United States testified as government witnesses that they understood that Gray was directing the narcotics transactions.However, the defense successfully challenged the couriers' credibility.

In its massive indictment against Gray, the government had accused him of buying three houses, a nightclub and five cars with cash that he earned from importing heroin.

Gray, who spent seven years in St. Elizabeths Hospital after being found innocent for reasons of insanity in a bank robbery case in 1967, testified calmly that the money he spent was left over from his bank robbery days.

He attributed his troubles with the law as stemming from his association with Terry in a rock concert promotion in July 1977. He said Terry was a drug dealer who dealt with organized crime figures from New York. tgray said he was still trying to find Terry because the missing disc jockey still owed him money from that concert in St. Mary's County, Md.

Terry disappeared shortly after that concert. His care was found burned in North Carolina months later, but there has been no sign of Terry since then.

Seventeen persons were originally charged by the government with participating in the drug ring. Three of them are foreigners who have been convicted and sentenced by Dutch authorities. Two local suspects, Robert W. (Dirty Bob) Young Sr., of 1115 Nova Ave., Capitol Heights, and Gary P. Carter, of 3447 25th St. SE, are fugitives.

In addition to Gray, Cathey and Wilson, the jury yesterday acquitted Alton D. Nelson, 33, of 2425 Naylor Rd. SE, and Clarence Salmon Jr., 27, of 3607 25th Ave., Hillcrest Heights. At the end of the government's case, Judge Bryant acquitted Darlene B. Fleming, 23, of 6403 Pine Lane Dr., Morningside, Md., and Barbara Ann Greer, 32, of 2201 Columbia Pl., Hyattsville.

Convicted yesterday were:

George Franklin Carter III, 22, of 3447 25th St. SE, conspiracy and drug-importation charges; Richard R. Tillman, 36, of 2621 Brown Rd. SE, one count of conspiracy; Smith D. Hammond, 22, of Chicago, seven counts, including conspiracy and drug-smuggling related charges; and Irene M. Taylor, 32, of 2300 Goodhop Rd. SE, four counts, including conspiracy, making false statements on a passport application, and drug-importation.

The 17th defendant is Stuckey, who is scheduled to be tried later.

Gray's conviction came on four counts involving his income-tax returns for 1976 and 1977, in which he claimed he made a total of about $20,000. The jury found that he had approximately $300,000 in income during those two ywars.

Defense attorney Robinson said after the verdict that Gray had been given a lie-detector test earlier and the only charge on which he failed was the income-tax problem.

U.S. Attorney Rauh said Gray could be sentenced to a total of 10 years on the tax counts "and we plan to ask that he receive the maximum."

Gray also has up to 15 years of unserved time on a previous bank robbery conviction, prosecutors said, that he could be required to serve. CAPTION: Picture, LINWOOD GRAY...$300,000 in loot