John A. Shorter Jr., a prominent District defense lawyer who maintained that he was not guilty of income tax evasion because he is a "compulsive gambler," took another big chance yesterday when he withdrew from a plea bargain in his tax case minutes before it was scheduled to be presented to a federal judge.

A grand jury indictment last November charged Shorter, 57, with seven counts of tax evasion and failing to pay $287,600 in taxes, penalties and interest.

Yesterday morning prosecutors filed a statement in U.S. District Court that Shorter had agreed to plead guilty to six misdemeanor counts of willful failure to pay income taxes between 1978 and 1983 in return for dismissal of the felony count of tax evasion, which covered 12 years from 1972.

But when Assistant U.S. Attorney Carol Bruce arrived at the U.S. Courthouse here after lunch for a 2 p.m. hearing, she said, she was told the plea had been withdrawn.

At about 2:15 p.m. Shorter walked into the courtroom of U.S. District Judge Harold Greene with four attorneys and listened quietly as lawyer Plato Cacheris announced that he had heard from Shorter in the morning that he "does not wish to dispose of the case on the terms and conditions now offered."

Cacheris said he and Shorter's other three lawyers wanted to withdraw from the case.

When Greene asked Shorter if he wanted to stand trial on the full indictment, Shorter said, "Yes, your honor."

Greene said the trial would begin Sept. 9 and warned Shorter not to take on any new cases that would conflict with that date.

Greene added that when Shorter selects new attorneys they should tell the court well before the trial whether Shorter still intends to rely on "this gambling obsession defense."

In papers filed in March, Shorter said he intended to present expert witnesses to testify that he did not have any money to pay income taxes because of his "overwhelming, uncontrollable impulse to use the funds for gambling," mostly at race tracks.

Because of Shorter's "pathological gambling," the papers said, he could not be found guilty on the tax charges because he did not have the "specific intent" needed to get a conviction.

Prosecutors asked Greene to bar Shorter from making this argument at trial, saying it is contrary to federal court decisions.

The prosecutors added that there is "no scientific basis" for the belief that "compulsive gambling is a mental disease or defect that could properly be relied upon" to show that a defendant had a "diminished capacity" to control his conduct.

Bruce indicated in court yesterday that a hearing on whether Shorter could make the gambling defense was canceled on April 29 after agreement had been reached on the plea bargain.

After he left the courtroom, Shorter declined to comment on why he had changed his mind.

Cacheris declined comment on why he withdrew from the case.

As they stood near the elevator, Cacheris asked Shorter, "John, is there anything I can do?" Shorter replied, "Thanks for everything. I'm all right." 1: JOHN A. SHORTER JR . . . .trial set for Sept. 9