The troubled life of Malcolm Shabazz, the grandson and namesake of the African American civil rights leader Malcolm X, came to an end May 9 in Mexico City, where he was beaten to death. He was 28.

Terrie Williams, a publicist for the Shabazz family, confirmed the death to news organizations. Several conflicting accounts of his death were circulating Friday. But a friend, Miguel Suarez, told the Associated Press that Mr. Shabazz was injured in a fight after a dispute over a bill at a bar in Mexico City. Suarez took Mr. Shabazz to a hospital, where he died.

Mr. Shabazz was the first male descendant of Malcolm X, the fiery civil rights figure and member of the Nation of Islam who was slain after giving a speech in New York City in 1965.

Malcolm’s widow, Betty Sha­bazz, had four daughters and was pregnant with twin girls at the time. She raised her six daughters alone while keeping the memory of her husband alive. Her second daughter, Qubilah Shabazz, was Malcolm Shabazz’s mother.

In some ways, the life of the young Mr. Shabazz paralleled that of his grandfather, with frequent moves and family disruptions in his childhood, outbursts of violence and time in prison.

Mr. Shabazz first appeared in an unwanted spotlight in June 1997, when he was 12. While living with his grandmother in Yonkers, N.Y., he set fire to her apartment. Betty Shabazz was left with third-degree burns over 80 percent of her body. Rescuers said she repeatedly said “my grandson,” as if to indicate that he were still inside the burning apartment.

But Malcolm Shabazz was soon taken into custody while wandering the streets, his clothes soaked with gasoline. After three weeks, Betty Shabazz died from her injuries at age 61. The young Mr. Shabazz pleaded guilty to juvenile charges of arson and second-degree manslaughter and spent 18 months in juvenile detention centers.

In a 2003 interview with the New York Times, he said he thought his grandmother could find her way to safety and escape the fire.

He also said he had imaginary conversations with the woman he called “Mama Betty.”

“I just wanted her to know I was sorry and I wanted to know she accepted my apology, that I didn’t mean it,” he said. “But I would get no response, and I really wanted that response.”

Malcolm Lateef Shabazz was born Oct. 8, 1984, in Paris, where his mother was studying at the time.

Qubilah Shabazz was 4 when she witnessed her father’s murder. She gave up Islam at age 11 and became a Quaker.

She dropped out of Princeton University and moved to Paris, where she met an Algerian man who was Malcolm Shabazz’s father but had no further contact with the family.

Qubilah Shabazz later worked as a translator, held odd jobs and was beset by personal problems. She and her son moved from New York City to Philadelphia to Los Angeles to Minneapolis to San Antonio, often living in rundown boarding houses.

In 1995, Qubilah Shabazz was indicted for trying to hire a hit man to kill Louis Farrakhan, the Nation of Islam leader she believed may have had a role in her father’s death. Her son was taken from her custody and lived with aunts and other relatives but had few father figures in his life.

According to a 1997 article in The Washington Post, by the time he was 5, Malcolm Shabazz would address bus drivers and male teachers as “Dad.”

The charges against his mother were dropped after she admitted her role in the plot and agreed to receive psychiatric treatment and counseling for substance abuse. But relations between mother and son were fraught with difficulty, and early in 1997 authorities took Mr. Shabazz from his mother, and he went to live with his grandmother.

As a teenager, Mr. Shabazz later said, he was a member of the Bloods street gang, and at 18 he went to prison for three years for robbery. He studied Islam in prison and said other inmates were well aware of his legacy.

“My name will bring attention,” he told the Times in 2003. “People know Malcolm Shabazz, whether you like me or not.”

His Facebook page said he was a student at the John Jay College of Criminal Justice in New York, but that could not be immediately confirmed.

In a 2012 interview with the Atlas Shrugs Web site, Mr. Sha­bazz said he believed Muslims had nothing to do with the Sept. 11, 2001, attacks.

“We Muslims don’t take actions like this,” he said. “Many of the people who were involved in 9/11 itself were actually agents for the United States.”

Mr. Shabazz’s survivors include a daughter and his mother.

When Mr. Shabazz appeared in court in 1997 at age 12, he was wearing handcuffs and a blanket over his head.

His attorney, Percy Sutton, described him as “a child who needs care.”

Sutton, who had first defended Malcolm X in 1957, said of the young Mr. Shabazz, “He is a child who came into a climate of tragedy.”