Let's answer this question slowly: Did Malcolm X avoid eating ham?
Malcolm X was a practicing Muslim. Muslims are prohibited from eating foods derived from pigs. So the answer is yes.