This city's school system appears to be on a collision course with a Justice Department lawsuit that could result in court-ordered busing to desegregate public schools here.

In a last-ditch effort to keep the case out of the courts, the Department of Health, Education and Welfare late today sent school Superintendent Joseph P. Hannon a letter outlining what actions -- in principle at least -- the board of education must accept by Wednesday if it hopes to forestall even the first steps of court-mandated desegregation.

The letter again establishes that HEW's Office of Civil Rights is seeking to make the city swallow an idea its political leadership cannot yet abide; that the burden of desegregation must fall on white students as well as blacks, and that the city will simply have to face up to the accompanying risk of a widescale exodus of whites to suburbs. The system is 80 percent minority.

Unless the city "crosses the Rubicon" and takes that and other "major steps toward preparing a lawful desegregation play by Wednesday" HEW officials said that Secretary Patricia Roberts Harris will refer the case to Justice, the first step in a court suit against the city.

Such a suit -- which the federal government, the school system and city officials all say they want to avoid -- would climax almost two decades of efforts to desegregate the city's schools in accordance with official civil rights policies. Past attempts have been frustrated by Chicago's legendary Democratic machine.

In the letter from David Teatel, head of the Office of Civil Rights, HEW says the only way to extend Wednesday's deadline is for the school board to agree at a meeting that day that no public school in the city can be more than 50 percent white or 65 percent black.

In addition, HEW wants the board to affirm that mandatory busing will be used to desegregate schools if voluntary measures do not work.

City officials have opposed mandatory busing because of fears of widescale "white flight" to the suburbs.

And Hannon has been unwilling to meet an HEW requirement that Chicago's all-white public schools be eliminated and the dwindling number of white students be transfered to integrated classrooms.

Instead, he has pushed an alternative voluntary desegregation program called "Access to Excellence" which involves little mandatory busing and proposes instead to attract interested students to "magnet" schools and vocational centers where specialty courses are offered.

Although the plan might affect as many as 100,000 students and force some whites out of some segregated schools, HEW says the plan won't do. Because it lacks specificity, affects too few students and relies mainly on voluntary efforts, the government says, it cannot survive a court challenge.

More than 15 years ago, the Rev. Martin Luther King Jr. complained that segregation found in Chicago's school system was far more contemptible than the racism he had encountered in the Deep South.

Today, after the flight of thousands of whites to largely segregated suburbs, the arbitrary division of city neighborhoods along racial lines has only intensified. Last year, for example, the Illinois Office of Education found more evidence of deliberate school segregation in Chicago than in any other of the nation's 10 largest northern and western cities.

And, according to the federal government, 80 percent of the city's elementary students last year attended schools either 95 percent black or 95 percent white.

The latest desegregation showdown began last April when HEW charged that the school board "intentionally created and maintained a racially discriminatory dual school system" and bolstered its charge with a detailed 100-page appendix. HEW officials believe their case against Chicago is the strongest they have ever been able to establish against a city school system.

The HEW report contends that the school district not only mirrored the segregated residential patterns of the city in assisting students, but that it used its school construction budget to create new areas of segregated housing.

It documents how for more than 20 years the board of education "contained the growing black school population through a variety of means, including the location of new school buildings and additions, drawing of school boundary lines, faculty assignments and busing plans."

Where whites and blacks lived in close proximity, the study says, "the district consistently selected methods of school assignment that resulted in the creation of perpetuation of students' racial segregation" when it just as easily could have straddled these "unnatural boundaries" and helped break up segregated housing patterns.

In support of the "containment" claim the report, goes on to show how the board consistently overlooked underpopulated white schools when shifting blacks from overcrowded classrooms.

In 1974 the board bused 300 children out of a severely overcrowded South Side School that was 90 percent black. The children ended up at another all-black school four miles away, while the closest school in the district, less than two miles away, had six empty classrooms. The underused school was largely, white; that busing pattern continues to this day.

This, like other board actions, the government contends, "contributed to the racial instability of these areas by creating and maintaining a system composed of identifiably white and identifiably black schools. In such a system, the presence of a substantial number of black students in a white school becomes a signal for its abandonment by white students."

In the past, Chicago's potent political machine has been able to side-track all desegregation efforts. Francis Kepple, federal commissioner of education in the mid-1960s, recalls that when he tried to withhold funds from Chicago in the absence of a good-faith effort to desegregate its schools. Mayor Richard J. Daley wasted little time in letting the White House know he was outraged.

"It was pretty clear from the highest sources," Kepple said this week, "that you had to have a stronger legal and political case to impose change in the city of chicago."

Before long a deal was worked out. "We didn't withhold money, and there wasn't much action in Chicago," Kepple said in recounting the negotiations.

Many still believe that Illinois' crucial presidential primary next March guarantees that no federal suit will be filed against Chicago for quite a while.

But federal officials point out two legal wrinkles that might lead to an early court battle. The first is a consent decree signed in December 1977 by then-Secretary Joseph A. Califano Jr., who said HEW would enforce the civil rights laws it was accused of ignoring. If HEW fails to take the the promised action, the NAACP, which filed the suit, could return to U.S. tDistrict Court Judge John J. Sirica and force the issue.

Second, wide-ranging school desegregation was blessed by the U.S. Supreme Court last session, when it upheld plans to desegregate schools in Dayton and Columbus, Ohio.

Until two weeks ago, when HEW rejected Chicago's last alternative, superintendent Hannon had exuded optimism about the chances the district could avoid a court suit. Now he is not talking -- at least not to reporters.

Like Mayor Jane Byrne, who has backed him, Hannon appreciates the political consequences of mandatory busing on the city's white community. White leaders, especially in the city's Southwest Side, have vigorously opposed even the "Access" program the federal government rejected and have threatened to send their children to private or parochial schools if the busing issue is forced. (When the first of Hannon's voluntary efforts two years ago brought a handful of black children into a Southwest Side elementary school, residents took to the streets, throwing rocks at cars driven by blacks and burning Hammon in effigy in a neighborhood park.)

In addition, few blacks have spoken out on behalf of the desegregation program.

One who understands uniquely the political pressures of the looming desegregation battle is Don Rose, who helped prepare one of the early civil rights suits lodged against the city in 1961 and who earlier this year managed Byrne's upset win in the Democratic mayoral primary over incumbent Mayor Michael Bilandic.

"Fumdamentally, busing is a political death kiss," he says. "Nobody, black or white, is for it. But the mistake HEW made was to suggest massive and unrealistic busing . . . maybe five times more than what is necessary.

"They have forced the politicians into a direct confrontation. And given the temperament of Mayor Byrne, she's going to stand and make the fight."

HEW spokesman Bill Wise said Secretary Harris understands that "civil rights suits are politically volatile.But she also understands what the Constitution requires. There is a matter of law that has to be recognized here, and the people in Chicago haven't recognized it yet."