The Prophet Shu'ayb was a descendent of the Prophet Ibrahim. He was sent to Midian and the Dwellers of the wood to give them Allah's message.
The Midianite people committed many sins. They gave short measures and weights, they robbed people and caused mischief but most seriously they tried to stop people from worshipping Allah.
Shu'ayb tried to make them change but they would not listen to him. They wanted to throw him out and all the people who had listened to his words.