Joseph G. Martin, who pleaded guilty to racketeering and tax evasion charges in connection with the largest gold and silver fencing operation ever uncovered in Washington, was sentenced in federal court yesterday to serve eight years in prison.

After a three-hour sentencing hearing yesterday, U.S. District Judge John H. Pratt told Martin, "It's up to us . . . to fly the flag to let people know that this type of conduct is just plain not going to be tolerated."

Pratt ordered the 37-year-old Martin, who was arrested in an extensive undercover operation known as "Operation Greenthumb," into the custody of the U.S. Marshal Service and said he should be taken immediately to the federal correctional institution at Allenwood, Pa., to begin serving his jail term.

Law enforcement officials had contended that Martin and Alan C. Danneman together had masterminded the fencing ring, which netted $3 million in gold and silver goods that had been stolen from homes in the Washington area. Martin had been the operator of Royal Carpet and Tile at 1785 Florida Ave. NW, which had been one of the targets of "Operation Greenthumb."

The investigation, supervised by Assistant U.S. Attorney Joseph F. McSorley and Justice Department organized crime strike force lawyer Roxane Sokolove, was conducted by the FBI, the Internal Revenue Service and the Metropolitan Police Department.

"I have been punished more than anybody I have seen in my god damn life," Martin said at yesterday's hearing, describing how federal officials had swept through his Maryland home after his arrest and confiscated silver, gold, Persian rugs, jewelry, $216,000 in cash, 8,679 silver dollars and four luxury automobiles. Martin's wife, who now helps her husband run a rug business in Takoma Park, told Pratt, "they left us with $63 . . . "

All the property and the cash since have been forfeited by Martin, who now lives in Burtonsville, in connection with his guilty plea to the federal racketeering charges--as proceeds of a criminal enterprise--and to satisfy federal tax liabilities.

"I'm sorry for what happened. I'm not a criminal. I don't want to go to jail," Martin, his voice breaking, told Pratt.

Pratt sentenced Martin to concurrent terms of eight years in prison for racketeering, three years for tax evasion and four years for solicitation to commit embezzlement. Officials said yesterday that Martin would be eligible for parole after serving about 24 months of the prison terms.

Danneman, who pleaded guilty to racketeering and tax evasion, has not yet been sentenced. Forty burglars who allegedly supplied the two men with stolen goods have also been convicted in connection with the case, which involved about 800 burglaries in the Washington area involving about $8 million in property.