Shuʿayb was sent to the people of Madyan as "their brother" — one of their own (7:85; 11:84). Madyan lay in north-west Arabia, near the Gulf of ʿAqabah. Its people worshipped others besides Allah, and they were traders who cheated others by giving short measure and weight.
He called them: "O my people, worship Allah; you have no god other than Him. A clear proof has come to you from your Lord. So give full measure and weight, do not cheat people of their things, and do not cause corruption in the land after it has been set right" (7:85). He told them not to sit on every road, threatening travellers and turning believers away from Allah's path (7:86). He warned them: "I see you in prosperity, but I fear for you the punishment of an all-encompassing Day," and "What remains with you from Allah is better for you, if you are believers" (11:84–86).
They answered with mockery: "O Shuʿayb, does your prayer command you that we abandon what our fathers worshipped, or stop doing as we please with our wealth?" (11:87). He replied that he did not wish to do himself what he forbade them: "I only want to put things right as far as I am able. My success is only through Allah. In Him I trust and to Him I turn" (11:88). He warned them that what struck the peoples of Nuh, Hud and Salih could strike them too — "and the people of Lut are not far from you" — and urged them to seek forgiveness, for "my Lord is Merciful, Loving" (11:89–90).
They said, "We do not understand much of what you say, and we see that you are weak among us. Were it not for your clan, we would have stoned you." He replied, "Is my clan mightier in your eyes than Allah?" (11:91–92). Their arrogant leaders threatened to drive him and the believers out of their town unless they returned to their religion. He answered that returning to it after Allah had saved them would be inventing a lie against Allah, and prayed: "Our Lord, judge between us and our people in truth; You are the best of judges" (7:88–89).
The Quran also tells of Shuʿayb being sent to the "companions of the thicket" (al-Aykah), who likewise gave short measure. They called him bewitched and challenged him to bring down fragments of the sky upon them (26:176–187). Many commentators, including Ibn Kathir, hold that these were the people of Madyan, described here by the thick trees associated with them; others hold that they were a second people to whom he was also sent. Either way, their sin was the same: cheating in measure.
Then the punishment came. The Quran describes it as an earthquake (7:91), a mighty blast (11:94), and the punishment of "the Day of the Canopy" — a cloud that overshadowed them (26:189). The commentators explain that these were parts of one punishment. They lay lifeless in their homes, "as if they had never lived there" (11:95). Allah saved Shuʿayb and those who believed with him, by His mercy (11:94). Shuʿayb turned away from them, saying: "O my people, I conveyed to you the messages of my Lord and gave you sincere advice. How can I grieve for a people who disbelieve?" (7:93).
The Quran does not tell us where or when Shuʿayb died. Nor does it name the old man of Madyan whose daughter Musa later married (28:23–28). Some commentators said he was Shuʿayb, while others held that he was someone else; since this is not established, it is not stated here as fact.