France's new Socialist leadership is retiring the guillotine, breaking with nearly 200 years of history during which the terrible machine symbolized the severity and revolutionary traditions of Gallic justice by slicing of countless heads.

From the beginning of his campaign for president, Francois Mitterrand opposed the death penalty "in my conscience, in my deepest conscience," and said he would not allow it to be used during his administration. Parliamentary approval is expected soon for legislation to abolish the death penalty.

For six men appealing death sentences, the decision means they no longer face the prospect of having their necks severed by the blade's deadly swoop.

For Justice Minister Robert Badinter, it crowns a long struggle against the death penalty in France. His crusade began one cold dawn in November 1972 when, as the lawyer of a condemned murderer, he watched his client's execution by guillotine, a moment that so traumatized him that he later wrote: "Crime physically changed sides" when the blade fell.

For the French people, it means at last joining the rest of Western Europe where, except for Greece, the death penalty has been abolished or fallen into disuse for common criminals.

By comparison, 36 of the 50 United States have capital punishment on the books. Against the background of France's change, Oklahoma's plans to execute convicted murderer Thomas Lee Hays by injecting drugs into his body have stirred wide interest here.

Executions in France have been by guillotine since a highway bandit named Nicolas Jacques Pelletier had his head sliced off by revolutionary authorities on April 25, 1792. The machine had been introduced as the instrument of capital punishment on the initiative of Dr. Joseph-Ignace Guillotin, an anatomist who in 1789 suggested to the French Revolution's Constituent Assembly that it would be more humane than hanging or chopping off heads with swords.

Guillotin also argued that it was more in the spirit of those times, because it would be more egalitarian. In royal days, commoners were hanged while nobles who went astray were beheaded.

Mitterrand's position follows a long tradition of French leftists. One of his earliest acts as president was to commute the death sentence of Philippe Maurice, who was convicted in 1979 of killing a police officer and whose final appeal had been rejected by the French equivalent of the Supreme Court. Mitterrand's Socialist government already has sent to parliament a law whose main clause reads: "The death penalty is abolished." The Socialists' majority in parliament makes passage certain.

Some French citizens still insist, however, that the death penalty is necessary to deter crime. This feeling is particularly strong among working-class conservatives. The most prominent among Mitterrand's four Communist Cabinet members, Transport Minister Charles Fiterman, reportedly stressed in a recent Cabinet meeting the need to explain to the people statistics showing that countries without capital punishment do not suffer from higher rates of violent crime than those that do.

But even in France the guillotine was rarely used in recent years because of rising public sentiment against capital punishment, encouraged by Badinter and others. Only eight executions have been carried out since 1965, according to Justice Ministry records. The most recent was that of a Tunisian immigrant in September 1977.

During the same period, 24 persons convicted of capital crimes had their death sentences commuted to life imprisonment by presidential decree. Measured against this background, the likelihood of a future French leader calling for a return to the guillotine seems small.

Surrounded by mystery and rich in tradition, the guillotine has always seemed the only way to mete out the death penalty in France. Since the last public guillotining in 1939, the ritual has gone unchanged.

The prisoner was awakened at dawn on the appointed day. He was allowed a cup of rum and a last cigarette, along with the ministrations of a clergyman, then was led to the prison courtyard. Bound and blindfolded, he was shoved swiftly onto a plank. This was pushed into place so that the prisoner's head slid into a depression on a wooden bar, the top half of which closed down like a pillory to fasten his neck tight.

When all was ready, the executioner pulled the trip. The slanted blade, topped by a 65-pound lead weight, streaked on ball bearings down two 10-foot-high posts until it cut through the prisoner's neck. After the head fell into a metal basin below, the body was put into a straw basket.

Georges Perruchot, a retired assistant executioner who broke a traditional pledge of silence, told a magazine interviewer recently that the guillotine was not always as efficient as it looked. Once, he said, a head was left hanging and had to be severed with a knife.

"You are a little splashed with blood sometimes," he said. "You have to go clean up."

Perruchot was an assistant for 29 years until his retirement in 1976, but never became executioner. That job remains in one family, according to tradition, and the current executioner got the job by marrying his predecessor's niece.

Perruchot lives in a Norman village with his wife, Emma, according to a Paris-Match reporter who discovered him there. The new government's resolve to abolish his old job is, in his view, a bad idea.

"I am indulgent for crimes of passion," he was quoted as saying. "As for the others, to the grave with them. If we cut the heads off all the guys who hold pistols, they would hesitate before using them."