The combination of having his spirituality reawakened in Mecca and learning of an assassination attempt against him ordered by Elijah Muhammad causes Malcolm X to quit the Nation of Islam. While giving a speech for his new Islamic organizaton, he is assassinated by NOI members.
Malcolm "Red" Little (Denzel Washington) is a street hustler in Harlem in the 1940s. In flashbacks, we learn that Malcolm's family was harassed by the KKK, and his preacher father was murdered by them. His mother was later institutionalized, so he and his siblings were placed in foster care, with Malcolm eventually ending up in Harlem. As a youth, Malcolm ran numbers for a local mobster, and later became a petty thief. He is soon caught and given the maximum sentence despite it being his first offense. While in prison, he meets Baines, a prisoner who is a member of the Nation of Islam, and he begins to talk to Malcolm about how the only way to escape prison, both literally and figuratively, is to learn the teachings of Elijah Muhammad (Al Freeman, Jr.). Malcolm is a willing student, but is hesitant to pray to Allah until one night he sees a vision of Elijah Muhammad in his prison cell. He then begins to pray to Allah and becomes a member of the NOI.
Upon his release from prison, Malcolm meets with Elijah Muhammad. Muhammad tells Malcolm that no white people are to be trusted because they are the enemy of black people. He also tells him to drop his slave name of Little and take up the African symbol of his surname, which is X. Now going by Malcolm X, he returns to Harlem as a preacher of Islam and sets up a mosque there. His fiery speeches and convincing arguments about how African-Americans should separate themselves from whites soon win over many converts. He meets and later marries Betty Shabazz (Angela Bassett) and has 4 daughters with her. Over the next several years, Malcolm becomes the national face and voice of the Nation of Islam, much to the dissatisfaction of other members of the NOI, and to Elijah Muhammad himself.
Malcolm learns that Elijah Muhammad may have fathered two illegitimate children with former NOI members. When confronted, Muhammad admits to it, claiming that since he was unmarried and had no children of his own, this was the only way to have progeny. He claims that Biblical heroes like Noah, David, and Solomon sinned as well, but people only care about the good things they did. Malcolm begins to lose faith in Elijah Muhammad and the Nation of Islam at this time. Malcolm is later suspended from public speaking by Muhammad due to disparaging comments he made about the Kennedy assassination. During his suspension, Malcolm decides to complete a hajj, a pilgrimage to Mecca that is required for all Muslims. During the hajj, he sees many people other than Middle Easterners and Africans there, including Caucasians and Asians. This trip reawakens his spirituality, and he realizes that separating African-Americans from other races will not accomplish anything.
Upon returning to Harlem, Malcolm learns of an assassination attempt against him ordered by Elijah Muhammad. Malcolm then officially quits the NOI and starts the Organization of African-American Unity, or OAAU, a new Islamic organization which will preach tolerance and togetherness for everyone who wishes to worship Allah. Malcolm and his family immediately begin receiving death threats from NOI members, and his house is firebombed. Despite the threats, Malcolm wants to restart his public speaking. On February 21, 1965, Malcolm is scheduled to give his first speech for the OAAU, with his wife and children in the audience. Just as he is starting his speech, gunmen rush the stage and shoot Malcolm several times. He is rushed to the hospital, where he is pronounced dead on arrival.
The movie ends with Ossie Davis delivering the eulogy at Malcolm X's funeral service, along with a montage of pictures and films of the real Malcolm X. This includes Nelson Mandela (who had recently been released from prison at that time) giving one of Malcolm's speeches to South African school children, which concludes with Malcolm saying his famous line, "By any means necessary".