An officer in the Federal Guard Service, which is responsible for protecting President Vladimir V. Putin, decided last fall to avoid fighting in Ukraine by sneaking across the southern border into Kazakhstan.

The officer, Maj. Mikhail Zhilin, disguised himself as a mushroom picker, wearing camouflage and carrying a couple of small bottles of cognac so that he could douse himself and then act drunk and disoriented if he encountered the Russian border patrol.

In the dark, the lean, fit major navigated across the forested frontier without incident, but he was arrested on the other side.

“Freedom is not given to people that easily,” he told his wife, Ekaterina Zhilina, months later, after Kazakhstan rejected his bid for political asylum and handed him back to Russia to face trial for desertion.

“He had these romantic notions when he first began his military-academic studies,” Ms. Zhilina said in a recent interview, describing perceptions drawn from Russian literature about the honor and pride inherent in defending your homeland. “But everything soured when the war started.”

Major Zhilin is among the hundreds of Russian men who faced criminal charges for becoming war refuseniks since Moscow’s full-scale invasion of Ukraine last year. Some dodge the draft, while those already serving desert or refuse orders to redeploy on the bloody, chaotic battlefields of Ukraine.

Maj. Mikhail Zhilin. He was sentenced to six and a half years in a penal colony and stripped of his rank.Credit…via Ekaterina Zhilina

In 2022, 1,121 people were convicted of evading mandatory military conscription, according to statistics from Russia’s Supreme Court, compared with an average of around 600 in more recent years. Before the war, a vast majority were fined, not imprisoned. Russia recently passed a measure making it much harder to avoid a draft summons.

In addition, criminal cases have been initiated against more than 1,000 soldiers, mostly for abandoning their units, according to a broad court survey by Mediazona, an independent Russian news outlet. Anticipating the problem in September, when several hundred thousand civilians were mobilized, Russia toughened the penalties for being AWOL.

The maximum sentence was doubled to 10 years for what is euphemistically called “Leaving for Sochi.” (SOCH is the Russian acronym for AWOL, but the expression is a play on the name of Sochi, a Black Sea getaway for the country’s elite and site of the 2014 Winter Olympics.) Refusing an order to participate in combat carries a sentence of three to 10 years.

That has not stopped Russian men from going to unusual lengths to avoid fighting. One officer said he took a bullet in the leg as part of a pact among several soldiers to shoot one another and then claim that they were wounded in a firefight. Hailed as a hero for various battlefield events, it took him six months to recover, at which point he decided to flee.

The Kremlin has shrouded in secrecy an increasing amount of information about the military, including new statistics about crimes involving military service, so the numbers are undoubtedly higher than what is available. But the number of AWOL cases accelerated after the general mobilization, according to Mediazona. Many criminal cases involve soldiers who refused orders to enter battle, leading to confrontations with their commanders, according to several lawyers who defend soldiers.

One lawyer, Dmitri Kovalenko, was retained by the families of more than 10 soldiers who said they were thrown into pits, called “zindans,” near the front line after refusing to fight. “People realize that they are not ready — that their commanders are not ready, that they have to go in blind, not knowing where or why,” he said.

Intimidation is the first response of commanders, he said, so treatment can be harsh. Two soldiers whom he defended were locked into a container last summer without food or water, he said. At one point, about 300 conscripts who refused to fight last year were held in a basement in eastern Ukraine, where they were threatened, called “pigs,” not fed and not allowed to go to the toilet or to bathe, according to Astra, an independent news outlet, and other Russian news media organizations, quoting relatives. The Wagner mercenary group has threatened to execute its refuseniks, and there have been scattered reports of them being shot.

In theory, Russian law allows for conscientious objectors performing alternative service, but it is rarely granted. Sometimes those charged with refusing to fight are given suspended sentences, which means they can be redeployed.

The officer who was shot in the leg by his colleague had pursued a military career since he was 9 and a cadet, he said, but he wanted it to be over the minute he was ordered into Ukraine. He ended up staying about three months, appalled by the very idea of the war as well as by the terrible state of the Russian military.

Soldiers were not provided basic items like underwear, he said, and few knew how to navigate and got themselves killed.

“There are no saints on either side,” said the officer, who spoke on the condition that he not be named, nor his location published, out of concern that Russia might seek his extradition. “The locals were actively partisan. I shot back. I didn’t want to die.”

After he recovered, and the military ordered him back to Ukraine, he decided to run.

“I’m ready to die for Russia, but I don’t want to fight, to risk my life for the criminals who sit in the government,” said the officer, who is now on a wanted list in Russia.

Another Russian, a member of the Sakha ethnic group concentrated in the Siberian region of Yakutia, also deserted. Five days among the drunken, newly mobilized soldiers at an army camp convinced him to leave.

The man, who also insisted on anonymity, was fired from his construction job so that he could go fight. Packed onto an airplane, the draftees discovered their destination for training by looking at their phones when they landed. Most soldiers drank constantly, he said in an interview. One night in another barracks, he said, a soldier stabbed another to death.

The conscript said that the racist attitude of his Russian officers when he did his military service a decade earlier had soured him on the military — they called him “reindeer herder” because of his ethnic Siberian background. He said he was subjected to similar comments as soon as he mobilized. Things deteriorated further after he tried to bribe his lieutenant to leave. The officer mocked him openly as a coward.

His mother flew in to extract him, directing a taxi to a hole in the base’s fence. After he fled the country and was charged with desertion, he faced fierce criticism from home, he said, with the authorities saying that he had disgraced the Sakha people. Even a close friend threatened to beat him up.

Some Russian courts still publicize military cases to create a chilling deterrent to potential deserters. In the spring, for example, a court announced that a sailor who had gone AWOL twice had been sentenced to nine years in a prison colony.

The Krasnoyarsk Garrison Military Court released a photograph and a statement in December showing dozens of soldiers crowding a courtroom to watch an AWOL case. The sentence was pronounced before that audience “for preventive purposes,” the statement said.

In the Belgorod region near the Ukrainian border, two soldiers were detained on a parade ground in November and charged with refusing to obey a deployment order. They were called out of the ranks, handcuffed and thrown into a paddy wagon in front of their unit, all shown on a video posted on the Telegram messaging app. Earlier this month, both were sentenced to three years in prison, according to Russian news media reports.

Well before the war, Major Zhilin, 36, the soldier who left for Kazakhstan, had become disenchanted with the very administration he was assigned to protect. An engineer, he worked in the Siberian city of Novosibirsk for the presidential security service, supervising the Kremlin’s communications lines with the eastern parts of Russia.

Major Zhilin and his wife, Ekaterina Zhilina. She said he considered the sentence a “price” for freedom and a better alternative to dying in Ukraine.Credit…via Ekaterina Zhilina

The assassination of the Russian opposition leader Boris Nemtsov in 2015 and the poisoning of Aleksei A. Navalny in 2020 had drawn his attention, his wife said. He started following political news more closely.

He weighed quitting, but decided he could endure the two years until he received a pension. Then came the war. “‘It is one thing to suppress human rights,’” his wife quoted him as saying, “‘it is quite another to kill people.’”

In the fall, before the mobilization, he had visited the cemetery where his mother is buried. He found 30 new graves of riot police officers who had fought in the war. The ribbon on one small wreath said just “Daddy.”

Two colleagues had already died in Ukraine, and he wondered if his son, 11, and daughter, 8, might one day make a similar wreath. When the mobilization was announced, he quickly decided to leave the country.

Since his security clearance gave him access to state secrets, leaving was prohibited. He decided to cross on foot while his family drove into Kazakhstan legally.

But the plan went awry. Lacking a cell signal, he could not find their car. He was arrested after stumbling upon a Kazakh border officer. He requested political asylum, but in December, he was deported.

In March, he was sentenced to six and a half years in a penal colony and stripped of his rank.

Right after he was deported, his wife, fearing that she and the children would also be sent back, sought and received political asylum in France.

So far, her husband has not been mistreated, she said. The couple, although bitter toward the Kazakh authorities, consider the sentence a far better alternative than dying in Ukraine.

“Mikhail wrote me that he feels morally freer than he was,” she said, adding that he told her, “‘I guess you have to pay a certain price for the freedom to think and to say what you want.’”

Milana Mazaeva contributed reporting.