U.S. District Judge Harold H. Greene said that John A. Shorter Jr., the man before him for sentencing yesterday, was, in a way, "two different individuals."

One is an "excellent trial attorney . . .who enjoys the great esteem of the bench and bar," Greene said.

The other, Greene continued, "is a notorious and longtime tax evader" who owes nearly $300,000 in taxes, penalties and interest to the federal government and about $70,000 more in local income taxes to the District.

In October, Shorter, 58, a prominent criminal defense lawyer, was convicted of one felony count of attempting to evade federal income taxes from 1972 to 1983 and six misdemeanor counts of willfully failing to pay taxes from 1978 to 1983.

Yesterday, Greene sentenced him to three years and four months in prison on the tax charges, plus $10,000 in fines.

But Greene added that, as a lawyer, Shorter had "done much for the administration of justice" and urged that he not be disbarred, even though persons convicted of a felony involving "moral turpitude" are not allowed to practice law.

In the District, disciplinary actions against lawyers are handled by the D.C. Court of Appeals, generally with the advice of the court-appointed Board on Professional Responsibility. Greene said that he will send his recommendation to the board.

Yesterday, Shorter thanked friends and fellow lawyers who had written to Greene on his behalf, but made no further statements. He also declined to comment to reporters.

During the trial, Shorter represented himself after dismissing two teams of lawyers. He argued that he was not guilty because he was a "compulsive gambler" who intended to pay his taxes, but was unable to do so because he spent nearly all his money on gambling.

The jury took more than six days to reach its verdict.

Assistant U.S. Attorneys Carol E. Bruce and Darryl W. Jackson contended that Shorter deliberately evaded taxes by conducting all his business in cash and hiding his assets in bank accounts under the name of a former law partner, Bernadette Gartrell.

Just before the trial began, Greene denied Shorter's bid to present psychiatric testimony on the issue of "pathological gambling." Shorter did not to testify.

Yesterday, Greene said that the gambling defense "just wouldn't wash." He noted that Shorter "lived the life style of a successful professional," which prosecutors said included a Mercedes-Benz, a trip to the Superbowl, and expensive jewelery and furniture for a girlfriend.

"Apparently, the only one who did not get paid was the IRS," Greene said yesterday. If "flagrant violators" such as Shorter were not punished for evading taxes, Greene added, then "honest citizens who pay their taxes would feel like fools."

The conviction is the most recent in a series of tax problems for Shorter. In 1974, he pleaded no contest to failing to file a tax return for 1969. He was placed on probation for five years and later was suspended for six months from practicing law in the District.

In 1977, he was given a year's probation and fined $21,000 after pleading guilty to failing to pay District income taxes for 1968 and 1970.

Shorter has represented clients in some of the city's most widely publicized cases, including most recently Karen K. Johnson, a former D.C. government employe who was jailed last year for contempt after refusing to testify before a federal grand jury about alleged drug use by city workers.

Yesterday, Shorter said that he will appeal his conviction, and Greene allowed him to remain free without bail. About 20 friends, family members and former clients surrounded Shorter as he left the court, hugging him and shaking his hand.