WASHINGTON (AP) _ Thousands of complaints of locked wheels that sent General Motors Corp. X- body cars spinning out of control were the focus of arguments by company and Justice Department attorneys before appellate judges.

The Justice Department said Tuesday the complaints showed the cars were unsafe. GM countered that publicity had prompted the complaints.

At issue in a hearing before the U.S. Court of Appeals for the District of Columbia Circuit was the safety of 1.1 million 1980 X-body automobiles.

The government was appealing a U.S. District Court ruling in April that rejected arguments by the National Highway Traffic Safety Administration that the cars' rear wheels tended to lock when the brakes were applied normally, throwing the vehicles out of control.

Up to 800,000 of the X-body cars - the Chevrolet Citation, Pontiac Phoenix, Buick Skylark and Oldsmobile Omega - are still on the road, according to Transportation Department estimates.

The lower-court judge, Thomas Penfield Jackson, said tests had failed to prove a mechnical defect existed.

In a trial lasting nearly two years, NHTSA contended the alleged brake defect was linked to 1,417 accidents, 18 deaths and 400 injuries.

''The problem was confirmed by virtue of thousands of people complaining about it,'' said Douglas Letter, attorney for the Justice Department.

NHTSA said that by August 1983, when it sued GM, it had received more than 2,000 complaints about the vehicles.

Neither GM nor NHTSA tested the cars under road conditions, Letter said, arguing that the law allowed a recall if it could be shown an unsafe condition existed. No specific engineering proof of how that condition came about was required, he said.

GM attorney Thomas A. Gottschalk told the appellate judges the complaints largely resulted from ''intense, massive and unprecedented publicity'' prompted by NHTSA's allegations and earlier by private testing of the car, the first U.S.-made, front-wheel-drive vehicle.

''What was really going on here was apprehension in the mind of the public created by publicity,'' he said. That apprehension led to complaints and eventually to the trial, and the public was reassured, he said.

''Consumer complaints failed to convince the trier of fact'' in the lower court that the skidding was caused by a defect in the cars, Gottschalk said.

The lawsuit had asked that GM be fined $4 million. It marked the first time NHTSA had gone to court seeking a recall without first using administrative procedures.

GM introduced the X-body cars in 1979 and discontinued them six years later, after about 3 million had been sold.

The Justice Department asked the court to render a quick decision in the case but was unable to say how soon the court might act. The appeal was heard by Judges Harry Edwards, Kenneth Starr and Douglas Ginsburg.