"Traditional Islamic prayers will be offered over his remains," Imam Al-Hajj Talib Abdur-Rashid of the Mosque of Islamic Brotherhood in Harlem said before the service, which drew more than 200 people
A private burial service, led by Abdur-Rashid, is planned by Tuesday at Ferncliff Cemetery in Hartsdale, N.Y., where his grandparents are buried. A memorial service is being planned for sometime next week in New York City.
"Malcolm Shabazz was very popular among the young people of his generation," Abdur-Rashid told The Journal News.
The service, which lasted more than two hours, featured plenty of prayer, songs, spoken word and tears. Many among the procession of speakers said while they initially connected with Shabazz because of his famous grandfather, they learned to appreciate a man they called "Young Malcolm" as a leader in his own right.
"If I could put into one word how I feel about Malcolm, it would be, 'inspiration,'" Hussein Mekki, 32, told fellow mourners. "Hopefully that will continue, and he can inspire us for the rest of our lives."
Abdel Malik Ali, 55, a community activist from Oakland, said "Young Malcolm" appeared ready to fuse the history of Malcolm X along with his own experiences he described as "Generation Next."
"He was looking for his own voice, his own place in this world," Ali said. "He had his struggles just like everybody else, but he eventually took on a huge responsibility in embracing his family's legacy that's harder than anybody could ever imagine."
While Shabazz, a former New York resident, settled in the Bay Area about four years ago on the advice of friends and local political activist Yuri Kochiyama, who knew his grandfather and wrote to Shabazz while he was incarcerated.
Close friend Hashim Ali Alauddeen said Shabazz planned to attend community college in the area and eventually seek a bachelor's degree in African-American studies at the University of California, Berkeley.
"His heart was sincere. He strived to do what's right," Alauddeen said tearfully as he stood over Shabazz's casket while delivering his friend's eulogy. "He did his best to purify his soul. His intention and his sincerity was to serve God."
Mexico City's top prosecutor said two waiters arrested in the May 9 death had served Shabazz at the Palace bar near Plaza Garibaldi. An autopsy found Shabazz died of blows to the head, face and torso.
Malcolm X, then Malcolm Little, became a follower of the Nation of Islam while in prison during the early 1950s for burglary. After being paroled, he became the well-known national spokesman for the Nation of Islam, which combined Islamic beliefs with a black nationalist ideology.
He had a falling out with Nation of Islam leader Elijah Muhammad and left in 1964 to form his own Harlem-based group, Muslim Mosque Inc. Malcolm X went on a pilgrimage to Mecca that same year and returned to embrace mainstream Islam.

Shabazz's body will be brought back to New York, where on Tuesday his family will hold a private service at The Mosque of Islamic Brotherhood in Harlem. He will then be interred at Ferncliff Cemetery in Hartsdale, where Malcolm X is buried.
Officials at the Harlem mosque said that the family is in the process of arranging a public memorial.
On May 9, Shabazz was found badly beaten outside of the Palace bar near Plaza Garibaldi in Mexico City by a friend, Miguel Suarez. Shabazz was taken to a hospital where he died, according to Suarez.
Officials in Mexico City have arrested bar employees David Hernandez Cruz and Manuel Alejandro Perez de Jesus in connection with Shabazz's death. Prosecutors allege that a fight broke out over a bar bill and the two men ended up punching and kicking Shabazz, as well as beating him with a bat. Cruz and Perez de Jesus are facing homicide and aggravated robbery charges.
Shabazz had been turning his life around in recent years, after several run-ins with the law in the Hudson Valley.
Shabazz, born in 1984 to Qubilah Shabazz, one of six daughters of Malcolm X and his wife Betty Shabazz, was only 12 when he set fire to his grandmother's Yonkers home. Betty Shabazz died from severe burns, and Malcolm Shabazz ended up serving 4 years in juvenile detention.
He later expressed regret for his actions, telling The New York Times in 2003 that he would sit on his jail cot and ask for a sign of forgiveness from his dead grandmother.
"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 Shabazz also served time for a 2002 attempted robbery in Middletown. He was released in 2005. In 2006, he pleaded guilty to criminal mischief for smashing the window of a Yonkersdoughnut shop.
In recent years, Malcolm Shabazz said he was writing a memoir and traveling the country to speak out against youth violence. On his Facebook profile, he said he was attending John Jay College of Criminal Justice in New York.
(Contributing: The Associated Press)