A federal judge in Miami yesterday threw out a Reagan administration policy keeping 1,910 Haitians in detention camps while they seek political asylum, but he stopped short of releasing the refugees immediately.

U.S. District Court Judge Eugene P. Spellman said the government had not discriminated against the Haitians on the basis of race, as attorneys for the refugees had charged, but he found procedural flaws in the way they were detained and as a result ruled the government's policy "null and void."

After President Reagan said a year ago that the nation was "losing control of its borders," the Immigration and Naturalization Service began detaining Haitians and some other newly arrived refugees.

But Spellman wrote in his 55-page opinion that the new detention policy "was adopted in a procedurally defective manner" because the government did not give the required 30-day advance notice or allow public comment.

He added, however, that the ruling does not mean the "detention in itself was unlawful. That question must be left to another day." Spellman scheduled a hearing Wednesday to decide the refugees' future, which remained in dispute even after his ruling.

Both sides greeted the decision as a victory. "It's a significant victory. We set out to get the Haitians released, and I think we will soon," said Ira Kurzban, a lawyer for the Haitians.

Associate Attorney General Rudolph W. Giuliani said the government "prevailed in the principal aspects of this case" because the judge found there was "no racial discrimination" against the refugees.

Bruce Winick, a University of Miami law professor who represented the Haitians, concluded: "The judge cut a political deal, by giving us the relief we wanted and the government a way to save face by saying 'you didn't discriminate.' "

The Haitians, most of whom are seeking political asylum here, have been held for nearly a year at detention camps in Florida, New York, Puerto Rico, West Virginia, Texas and Kentucky. The largest group, 480 refugees, is being held at the Krome Avenue detention camp 25 miles west of Miami.

Attorney General William French Smith announced Monday that the Justice Department would grant "parole" to some refugees who have sponsors and lawyers and provide assurances they will appear in court for exclusion hearings.

But lawyers at the Haitian Refugee Center Inc. in Miami said the restrictions in the Justice Department proposal are so tight that it would apply to only a fraction of those being held.

Until last May, Haitian refugees were medically screened before being released routinely into the custody of relatives or sponsors until hearings on their status could be held.

But this policy was discontinued--and the refugees were detained indefinitely--as the administration sought to stem the influx of Haitians arriving in boats along the Florida coast.

Winick said he would ask Spellman Wednesday to restore the previous government practice of routinely screening and discharging the refugees.

He said this would mean release for the Haitians in a matter of weeks as details are worked out. Church groups have agreed to act as sponsors for all Haitians in detention, he said.

But INS Commissioner Alan Nelson said it was "premature to speculate there will be any mass release."

The government will argue Wednesday for continuation of its limited "parole" release plan, Giuliani said. "The opinion doesn't order the release of anyone," he said.