Malcolm X follows the life of African-American activist Malcolm X. Rising from a troubled childhood, in which his father, a preacher, is murdered by the Black Legion and his mother is institutionalized for insanity, Malcolm gets a job as a Pullman porter, calling himself Detroit Red. After getting involved with a Harlem gangster named West Indian Archie with whom he has a falling out, Malcolm flees to Boston and decides to become a burglar. He and his best friend, Shorty (played by Spike Lee) are arrested by the police and Malcolm is sentenced to a ten-year prison term. In prison, a fellow inmate, Baines, introduces him to the teachings of the Nation of Islam.
Malcolm begins religious conversion as a disciple of Elijah Muhammad. During this fervent immersion into the Nation of Islam, he becomes an incendiary speaker for the movement and marries Betty Shabazz. Malcolm X preaches a doctrine of separation from white society. However, a pilgrimage to Mecca softens his beliefs, teaching him that Muslims come from all races, even whites, and he endeavors to break free of the strict dogma of the Nation of Islam, with tragic results. He is assassinated on February 21, 1965, in New York City.
In the present day, numerous children of African descent, both in the United States and Africa, declare "I am Malcolm X." Among them, is anti-apartheid activist and future South African President Nelson Mandela who begins quoting one of Malcolm X's speeches. The final scene depicts Mandela's 1990 release from prison and during the negotiations to end apartheid in South Africa....

Question: What does a pilgrimage to Mecca teach Malcolm?
Answer: The journey teaches Malcolm that Muslims come from all races including whites.
Alternative answer: Muslims come from all races