I think he believed in God strongly, but had no affinity to a particular religion. Its the same with many rappers (e.g. T-Pain's name is Faheem or something, also many of the Outlawz are Muslim, e.g. Hussein Fatal, Yaki Kadafi), a lot of them are Black Muslims, so quite unorthodox Muslims. Stemmed from the Civil Rights campaigns, Nation of Islam etc. However his parents were part of the Black Panther Party, which later on was led by a Muslim man (1999 or so).
But then he raps about Jesus and so on.
Its really open to debate, everyone around him were Black Muslims, but some of his lyrics talked about Jesus (who is actually a major Prophet in Islam).
So draw from it what you will.