Henning Mankell in June. (Nora Lorek/AP)

Henning Mankell, a Swedish writer whose Kurt Wallander detective novels sold tens of millions of copies and were translated into 40 languages, introducing readers around the world to the genre of jaded investigators and snow-covered corpses that has become known as “Nordic noir,” died Oct. 5 in Gothenburg, Sweden. He was 67.

His publisher, Leopard, announced the death. Mr. Mankell revealed he had cancer last year, and he chronicled the disease’s progression in a newspaper column that was translated into English by the London Guardian.

A wide-ranging author of approximately 40 books and 40 plays, Mr. Mankell’s international reputation soared with the publication of “Faceless Killers,” the first Wallander book, in 1991.

The novel introduced police inspector Wallander, a melancholic man in full: heavy-drinking, overweight, fond of opera, quick to rage, a failure at relationships, diabetic and (eventually) developing dementia — and able to solve intriguing murder cases set near the real-life southern Swedish town of Ystad.

More than standard police procedurals, Mr. Mankell saw himself writing beyond the boundaries of a particular genre, someone who, like the spy novelist John le Carré, “investigates the contradictions inside man, between men, and between man and society.” “Faceless Killers,” for example, was the story of an elderly couple whose torture and murder are blamed on foreigners.

Wallander was featured in 10 novels between 1991 and 2009, as well as two Swedish TV series and a BBC show starring Kenneth Branagh. The books were widely praised for their austere style and biting criticism of problems afflicting contemporary Sweden, with Mr. Mankell being described in one review in the Guardian as “one of the most impressive crime writers at work in Europe today.”

The commercial success of Mr. Mankell’s fiction also was credited with paving the way for the bleak dramas of Stieg Larsson (“The Girl with the Dragon Tattoo”) and the Norwegian Jo Nesbo.

Mr. Mankell typically spent half the year in his adopted country of Mozambique, where he had been director of a theater in the capital city of Maputo since 1986, and involved in humanitarian campaigns that included an oral history project for parents dying of AIDS.

He was also a vocal supporter of the rights of Palestinians, repeatedly comparing Israel with the apartheid-era South Africa that he had protested in his youth. In the midst of a 2010 tour to promote his final Wallander novel, “The Troubled Man,” he sailed in a flotilla that attempted to break an Israeli blockade and bring humanitarian supplies to Gaza. The convoy was attacked by Israeli forces, who killed nine activists and arrested dozens of others, including Mr. Mankell.

“You have to act, not just by writing, but by standing up and doing,” he told the Guardian after the attack. “For me, you cannot call yourself an intellectual if all you use your intellectual gifts for is to find excuses not to do anything. Which, sadly, is what I think a lot of intellectuals do.”

Henning Mankell, whose grandfather and namesake was a noted composer, was born in Stockholm on Feb. 3, 1948. He described being scarred from an early age by the absence of his mother, who abandoned the family shortly after her son’s birth.

“She couldn’t stand having children, which is a terrible thing for a child to deal with, but really, she just behaved as many men do,” he said. They briefly met again at 15 but it proved a dispiriting experience. She later committed suicide.

Mr. Mankell and two siblings were mostly raised by their father, a judge, in the central Swedish town of Sveg, a backwater the future novelist described as surrounded by bears and “Christmas tree forests.”

The family lived in an apartment above the court, where Mr. Mankell’s life was marked by frequent intrusions from the justice system. An orderly once ran upstairs to ask whether he could borrow Mr. Mankell’s toy cars to demonstrate how a traffic accident occurred, and on one occasion a school holiday was prolonged so that his father could investigate a local murder.

A voracious reader with little interest in formal schooling, Mr. Mankell dropped out of school at 16 to become a stevedore on a coal and iron ship. He settled in Paris for a short time in the late 1960s, taking part in the activism sweeping the country, before returning to Sweden to work as a stagehand in Stockholm.

He also participated in demonstrations against the Vietnam War and the Swedish university system; in the 1970s, he was a fringe member of a Norwegian Maoist group to which his girlfriend belonged. His earliest literary pursuits also mirrored his political interests, with stories that examined co­lo­ni­al­ism, the workers’ movement in Sweden and other conflicts over ideology.

Within a few years, he was making regular trips to Africa. “I came to Africa with one purpose: I wanted to see the world outside the perspective of European egocentricity,” he told the New York Times in 2011. “I could have chosen Asia or South America. I ended up in Africa because the plane ticket there was cheapest.”

Like his detective protagonist, Mr. Mankell’s personal life was fraught. He was married four times and had four children from relationships. Once asked whether his multiple marriages indicated he was difficult to live with, he replied, “It shows I am an optimist.”

His fourth and final wife was Eva Bergman, daughter of the Swedish film director Ingmar Bergman. Besides his wife and one son, Jon Mankell, a complete list of survivors was not immediately available.

“The most important thing is that I can reach my reader,” Mr. Mankell told the Irish Times in 2013. “I’m published in 45 languages in 112 countries or something. In many of these countries I’m not looked upon as a crime fiction writer, I’m looked upon as a writer. . . . All the Wallander books are basically a discussion on the relationship between democracy and the system of justice.”

He added that his life, divided between Europe and Africa, helped refine that perspective. “Living with one foot in the sand and one foot in the snow is, to me, basic for understanding the times I’m living in,” he said.