Ali said that he first heard of the Nation of Islam (NOI) when he was fighting in the Golden Gloves tournament in Chicago in 1959, and attended his first NOI meeting in 1961. He continued to attend meetings, although keeping his involvement hidden from the public. In 1962, Clay met Malcolm X, who soon became his spiritual and political mentor, and by the time of the first Liston fight NOI members, including Malcolm X, were visible in his entourage. This led to a story in The Miami Herald just before the fight disclosing that Clay had joined the Nation, which nearly caused the bout to be canceled.
In fact, Clay was initially refused entry to the Nation of Islam (often called the Black Muslims at the time) due to his boxing career. However, after he won the championship from Liston in 1964, the Nation of Islam was more receptive and agreed to recruit him as a member. Shortly afterwards, Elijah Muhammad recorded a statement that Clay would be renamed Muhammad (one who is worthy of praise) Ali (fourth rightly guided caliph).
Only a few journalists (most notably Howard Cosell) accepted the new name at that time. Ali later announced: "Cassius Clay is my slave name." Ali's friendship with Malcolm X ended as Malcolm split with the NOI a couple of weeks after Ali joined, and Ali remained with the Nation. Ali later said that turning his back on Malcolm was one of the mistakes he regretted most in his life.
Aligning himself with the Nation of Islam, its leader Elijah Muhammad, and a narrative that labeled the white race as the perpetrator of genocide against African Americans made Ali a target of public condemnation. The NOI was widely viewed by whites and even some African Americans as a black separatist "hate religion" with a propensity toward violence; Ali had few qualms about using his influential voice to speak NOI doctrine. In a press conference articulating his opposition to the Vietnam War, Ali stated, "my enemy is the white people, not the Vietcong". In relation to integration, he said: "We who follow the teachings of Elijah Muhammad don't want to be forced to integrate. Integration is wrong. We don't want to live with the white man; that's all." And in relation to inter-racial marriage: "No intelligent black man or black woman in his or her right black mind wants white boys and white girls coming to their homes to marry their black sons and daughters." Indeed, Ali's religious beliefs at the time included the notion that the white man was "the devil" and that white people were not "righteous".