Ousted Montgomery County Police Chief Robert J. diGrazia finally won a round yesterday in his attempt to contest his dismissal when the Maryland Court of Appeals ordered a new hearing in circuit court on the legality of his firing.

If the circuit court finds that diGrazia was illegally fired, diGrazia will get about $10,000 in back pay -- the amount of pay between March 1979, when he stopped receiving his salary, and May 1979, when his successor, Bernard Crooke, was sworn in as police chief.

DiGrazia and his lawyer, Peter Davis, could not be reached for comment on how a favorable decision for diGrazia would affect diGrazia's $6.5 million suit against the county in federal court. The suit contends that diGrazia's future employment prospects were "disminished" by his dismissal in December 1978.

Since his dismissal, diGrazia has been turned down for at least three top police jobs. He is writing a book about his experiences and occasionally works for lawyers as an expert witness in police brutality cases.

Gilchrist fired diGrazia three days after taking office. At the time, Gilchrist said he was dismissing diGrazia because he was "no longer effective" in dealing with the department as a result of his frequent criticism of police officers. Gilchrist specifically mentioned remarks diGrazia had made at a public forum that half the police force was "unqualified" and that most police officers "see the community as the enemy."

DiGrazia contested the dismissal in circuit court, arguing that the dismissal was punitive and that under a state law guaranteeing the rights of police officers he should have had a hearing before a board of police officials.

Circuit Court Judge Philip M. Fairbanks, however concurred with the county's argument that diGrazia was an employe who served at the pleasure of the county executive and was therefore not covered by the statute.

But yesterday, the high court ruled that diGrazia was protected by the state law, the Law Enforcement Officers' Bill of Rights.

The court also rule that Gilchrist may have illegally dismissed diGrazia if he based the firing on diGrazia's statements criticizing police officers.

The court remanded the case to circuit court to determine whether Gilchrist's decision to fire diGrazia was based on diGrazia's statements, in violation of "diGrazia's first amendment right to free speech.'

Gilchrist did not return a reporter's phone calls yesterday.He told his spokesman, Charles Maier, that he was 'not free to speak now. I may be called to testify."

County attorney Paul McGuckian said through Maier that he did not think the court's judgement was "appropriate," and that he would consider appealing any future decision that might be favorable to diGrazia.

"They're a little disappointed," Maier said of Gilchrist and McGuckian. "But they don't feel this has deteriorated the county's position."

In its ruling, the high court affirmed Gilchrist's right to fire diGrazia without citing any reason.

During his administration, diGrazia found himself in frequent disputes with his officers over his liberal policies and his philosophy that police officers should be "social workers with guns." Several months before diGrazia made his statements about police officers seeing "the community as the enemy," a majority of the rank and file voted "no confidence" in him.

DiGrazia, the former Boston police commissioner, was hired in 1976 to bring management reforms to the Montgomery County police department. But diGrazia was fond of saying that he met with resistance from the "good old boys" in the department.

In contrast to diGrazia, who has a flamboyant style and was eager to make changes in the department, Crooke, his successor, has kept a low profile and avoided, controversy.