MOSCOW — Sunday was to have been the day when Oleg Sokolov, in full Napoleonic costume, would take his life in spectacular fashion at St. Petersburg’s Peter and Paul Fortress.

Instead, having been fished out of the Moika River early Saturday morning with a backpack containing a woman’s severed arms, he was in the Mariinsky Hospital recovering from hypothermia and facing a murder charge.

The 63-year-old Sokolov is an assistant professor of history and one of Russia’s most prominent scholarly reenactors of the Napoleonic wars. The arms in the backpack are thought to be those of one of his students, 24-year-old Anastasia Yeshchenko, whose dismembered and decapitated body was found in Sokolov’s apartment just a few houses down from where he was hauled out of the water, drenched and intoxicated, police said.

Sokolov’s lawyer told the Tass news agency that he has confessed to the murder, a crime of St. Petersburgian passion that has parallels to Fyodor Dostoevsky’s novel “Crime and Punishment” — the use of an ax — and to the 1916 assassination of the “mad monk” Grigori Rasputin, with its denouement in the city’s dark interior waterways.

Sokolov told investigators that he shot Yeshchenko in a fit of rage on Thursday, then entertained guests on Friday while her body lay in a room behind a closed door.

After they left, he apparently decided to dismember and dispose of the remains. He told police that the task made him physically ill, and he drank heavily to keep himself at it. He might have jumped into the Moika, which is shallow enough to stand in, when the backpack didn’t sink, or he might have been so drunk that he toppled in accidentally. Both versions have been reported. In any case, he called out in anguish, and a passing taxi driver called police.

His plan, local news organizations reported, was to make his way to the Peter and Paul Fortress on Sunday, dressed as Napoleon Bonaparte, to romantically take his own life in front of gaping and undoubtedly awestruck tourists.

This was not Sokolov’s first alleged act of violence against a woman.

In 2008, a student he was involved with said he tied her to a chair and threatened to disfigure her with a hot iron. The police did not act on her complaint. Domestic violence has generally not been dealt with seriously in Russia, and a 2017 law softened penalties for first offenses.

A Human Rights Watch report last year cited a Russian government study from 2011 that found that one in five Russian women have reported being the targets of domestic violence. The rights group said that as many as 70 percent of women who suffer family violence do not report it.

In court Monday, Sokolov said that Yeshchenko had attacked him with a knife after they argued about his daughters. Investigators said he shot her four times.

Fellow students said Yeshchenko lived with Sokolov for some time but had recently moved out. Photos online show them dancing, she in an Empire dress with white gloves past her elbows, he in a glittering uniform decked with gold braid and a red sash, pulled tight around his evident paunch. He called her Isabelle, after one of the Bonapartes, and insisted she call him Sire.

They co-wrote two scholarly articles on aspects of Napoleonic history.

Sokolov had been embroiled in a bitter plagiarism controversy last year with a professor from Moscow and was also accused of assaulting a student who challenged him during one of his lectures. His employer, St. Petersburg State University, stood by him in that incident.

Some of his former students described Sokolov to local news organizations as passionate, knowledgeable, unstable and temperamental. A student in Moscow accused him in 2008 of tying her to a chair and threatening her with a hot iron.

One of St. Petersburg’s more flamboyant journalists, Alexander Nevzorov, showed a photo on Instagram of a copy of one of Sokolov’s books, on which the historian had written, “With the dedicatory inscription of a maniac.”

Sokolov, a widower, told police that Yeshchenko’s criticism of his two grown daughters drove him to kill her — using a decidedly anachronistic sawed-off shotgun.

Yeshchenko’s mother, Lt. Col. Galina Yeshchenko, of the Ministry of Internal Affairs, arrived in St. Petersburg on Sunday from her home in Krasnodar, in southern Russia, to arrange for the return of her daughter’s remains.

CORRECTION: An earlier version of this story misspelled the name of prominent St. Petersburg journalist Alexander Nevzorov, the name has been corrected.