I’ve read that he didn’t even pray in Arabic until he was on his way to Mecca and it’s making me curious about his general knowledge of non-NOI Islam, since I assume he was taught about Islam by the Nation of Islam.
After having read the autobiography, very little. The NOI is heretical to Islam, they don’t pray properly, fast for Ramadan, believe that Mohammad was the last of the prophets, believe someone named WD Fard was God incarnate, the list goes on.
After his break with the NOI, Malcolm X began studying orthodox Sunni Islam. He describes this in his autobiography itself:
At one or another college or university, usually in the informal gatherings after I had spoken, perhaps a dozen generally white-complexioned people would come up to me, identifying themselves as Arabian, Middle Eastern or North African Muslims who happened to be visiting, studying, or living in the United States. They had said to me that, my white-indicting statements notwithstanding, they felt that I was sincere in considering myself a Muslim -- and they felt if I was exposed to what they always called "true Islam," I would "understand it, and embrace it." Automatically, as a follower of Elijah Muhammad, I had bridled whenever this was said.
But in the privacy of my own thoughts after several of these experiences, I did question myself: if one was sincere in professing a religion, why should he balk at broadening his knowledge of that religion?
Mahmoud Yusef Shawarbi, who was the director of the Islamic Center of New York, was the person he mentions in his book. It's unclear to what degree Shawarbi was personally responsible for teaching Malcolm X but it's clear they met and it's clear Shawarbi felt confident enough in Malcolm X's understanding of Islam to certify him as a Muslim for hajj.
During the hajj, Malcolm X met with King Faisal during his trip to Saudi Arabia. He asked Muhammad Sarur As-Sabban, then Secretary General of the Muslim World League to help supervise Malcolm X's education. Malcolm X spent some time learning personally from as-Sabban and then Sabban appointed a scholar to come back with Malcolm X and teach him orthodox Islam. He also gave him 15 scholarships every year to enable young Black Americans to study at the University of Madinah. This was in addition to 20 scholarships a year given to him already to enable young Black Americans to study at Al-Azhar university. His teacher's name was Ahmed Hassoun, once part of the Ansar Al-Sunnah movement in Sudan. He was fluent in English since he had grown up in Sudan pre-independence from Britain. You'll sometimes see him in the background of photos of Malcolm X.
Given all this, there's little doubt that Malcolm X knew the tenets and practice of mainstream Islam pretty well towards the end of his life. Of course, prior to this, while a member of the NOI, he himself indicates that he had little knowledge of mainstream Islam.
References and Further Reading:
X Marks the Spot: Mapping Malcolm X's Encounters with Sudan Emily Jane O'Dell Journal of Africana Religions
Malcolm X: A Life of Reinvention by Manning Marable