The jinn inhabited the Earth before us it brings about a question, did they have Prophets and Messengers among them?
Allah says that no one is punished unless a messenger has come among them to spread the message. From the consensus the Prophet (PBUH) was a prophet to the jinn. Musa (AS) was clearly a messenger to the Jinn as indicated in Surah Al-Ahqaf and Surah Al-Jinn.
Therefore, all of the prophets were prophets to humans and the Jinn. However, were there prophets sent to the Jinn before Adam (AS)? There is an argument that says no, there were no prophets before Adam (AS) sent to the Jinn.
This argument is supported by the verse in the Quran where it says “And we sent not before you (as messengers) except men to whom We revealed from among the people of cities.” This is a proof to some that there were no prophets sent to the Jinn before Adam (AS).
However, there is a response to that, which is “There are men from amongst human beings, from amongst mankind that seek refuge in men from amongst the jinn.” Another ayah that supports this is “O assembly of Jinn and man, hasn’t there come to you messengers from amongst yourselves?” (Al-An’am:130) Linguistically speaking it means that Allah has sent messengers from men and jinn.
There is no concrete opinion that they had messengers or not. Allah definitely sent warners amongst them.