He warned the disbelievers about Hell
one of the most important duties of allah's messengers was to warn people and to make them fear his punishment and hell. the prophets are a means by which people come to fear allah and adopt high morality, and, for some of them, to live in paradise in the hereafter. the prophet (saas) also warned people about the torments of hell and tried to prevent them from wickedness, disbelief and atheism. some verses concerning the prophet (saas)'s warnings about hell read:
when our signs are recited to them-clear signs-you can detect denial in the faces of those who disbelieve. they all but assault those who recite our signs to them! say: "shall i inform you of something worse than that? the fire which allah has promised those who disbelieve. what an evil destination!" (surat al-hajj: 72)
"[i have for you] only notification from allah and his messages. as for him who disobeys allah and his messenger, he will have the fire of hell, remaining in it timelessly, for ever and ever." (surat al-jinn: 23)
the prophet (saas) described the torments of hell in detail for those who believed such things far fetched, and, as revealed in the qur'an, explained the lot of those in hell and how people would beg to be saved from its torments, extending every effort to cause them to avoid it.