As a child, Malcolm, then known as Malcolm Little, was the son of a Baptist preacher who actively promoted the philosophy of Marcus Garvey, founder of the National Negro Improvement Association,
that black people in the Western Hemisphere could achieve political freedom only by returning to the African homeland and could win economic independence by developing black-owned businesses.
Malcolm was certainly influenced by his father's experiences and beliefs.
Probably the most influential factor in shaping Malcolm X's life work was his involvement with the Nation of Islam. The beliefs and attitudes of this group gave him explanations for many of the situations of racial prejudice he had experienced in his life.
The Nation of Islam (NOI), founded in Detroit around 1930, taught that white people were an inherently evil race created in ancient times by a dissident black scientist named Yacub. The white slave trade destroyed the great African civilizations, stripped black men and women of their culture, and deceived them with a Christian religion that left them vice-ridden and subservient.
The Nation of Islam also offered solutions to the racial conflicts of the mid-20th century.
Rather than integration into a white society poisoned with racism, black people needed separation from the white world and the creation of a financially independent black homeland...At times straying from NOI’s doctrine, Malcolm called for a global “black revolution” aiming at independence, not the integration sought by (Martin Luther) King’s “Negro revolution.”
In 1964, Malcolm broke away from the Nation of Islam due to disillusionment with some of its leadership and practices. He did not separate from the Muslim faith, however, and did complete the hajj in 1962, which was a revelation to him.
There he encountered Muslims of all colors who were experiencing spiritual brotherhood. He no longer saw all white people as devils but would judge white individuals by their actions.
The change in his philosophy of needed actions to address racial inequalities was confirmed by his pilgrimage observations.