While the grandson of the late civil rights activist Malcolm X had a troubled past, friends and family recalled May 30 how he “redeemed himself” before his own death at a young age.

Several hundred attended a memorial service for Malcolm Shabazz at First Corinthian Baptist Church in Harlem.

The 28-year-old, who as a juvenile was incarcerated for a fire that killed his grandmother and widow of Malcolm X, was beaten to death in early May in Mexico City in a dispute over a $1,200 bar bill, authorities say. Two waiters have been arrested in the case.

In recent years, Shabazz traveled around the world speaking out against youth violence.

“It was difficult to be the grandchild of such a powerful man,” said Shabazz’s childhood school teacher Angela Freeman, in whose house Shabazz lived for a few months as a child.

“He had to work through it , and he did,” she said.

Freeman said Shabazz was a witty, bright child who was “very affected” by his grandfather’s assassination.

“Malcolm embraced his legacy and with reverence for his grandfather identified himself as the grandson, namesake and first male heir of the greatest revolutionary of the 20th century,” the memorial service program read.

Malcolm X was shot to death in 1965 as he delivered a speech in a Harlem ballroom.

Shabazz was laid to rest last week near his grandparents at the Ferncliff Cemetery in Hartsdale.