He worked on an autobiographical book that was released after his death.
Although Haley was initially referred to as the book's "ghostwriter," the Autobiography is now seen as a collaboration between Malcolm X and Haley, who would go on to write Roots. During the writing of the book, Malcolm X publicly left the Nation of Islam, delivered his "The Ballot or the Bullet" speech, converted to Sunni Islam, and made a pilgrimage to Mecca. Malcolm X was shot and killed on February 21, 1965, during a gathering in New York City's Audubon Ballroom, just two days after informing a reporter that the Nation of Islam was actively attempting to murder him.
The book provides a thorough account of Malcolm X's life, covering everything from his earliest memories of his mother—who would eventually be committed to a mental institution—to his involvement in organized crime and subsequent incarceration, during which he joined the Nation of Islam and corresponded with Muhammad. Critics have compared the Autobiography and St. Augustine's Confessions because both tell the story of a disobedient young man who undergoes a religious conversion. Through his affiliation with the Nation of Islam and backing for the Black power movement, Malcolm X gained notoriety in the civil rights movement. He was already a hero, but his passing made him a martyr.
As such, The Autobiography of Malcolm X was an immediate best-seller. Doubleday’s decision to pass on the book in the wake of the assassination, out of fears that it might be targeted for publishing it, has been described by biographer Manning Marabel as “the most disastrous decision in corporate publishing history.” The book has long been considered required reading for civil rights activists and continues to form the basis of Malcolm X’s enduring legacy.