(O mankind! Worship your Lord … ) [2:21].
Sa‘id ibn Muhammad ibn Ahmad al-Zahid> Abu ‘Ali ibn Ahmad al-Faqih> Abu Turab al-Quhustani> ‘Abd al-Rahman ibn Bishr> Rawh> Shu‘bah> Sufyan al-Thawri> al-A‘mash> Ibrahim> ‘Alqamah who said: “Any revelation which contains the expression (O mankind!) is Meccan while any revelation which contains the expression (O ye who believe!) is Medinan”. He means to say that the expression (O mankind!) is an address to the people of Mecca while (O ye who believe!) is an address to the people of Medina. Hence, Allah’s saying (O mankind! Worship your Lord … ) is an address to the Meccan idolaters. The address of the idolaters of Mecca goes on until Allah’s saying: (And give glad tidings…) [al-Baqarah, 2:25]. This last verse was revealed about the believers. This is because Allah, exalted is He, wanted to mention here the reward of the believers after having mentioned the reward of the disbelievers in His saying: (… the fire prepared for the disbelievers, whose fuel is of men and stones) [al-Baqarah, 2:24].
Asbab Al-Nuzul by Al-Wahidi , trans. Mokrane Guezzou