وَمَا خَلَقْتُ ٱلْجِنَّ وَٱلْإِنسَ إِلَّا لِيَعْبُدُونِ ﴿٥٦﴾
I created the jinn and humankind only that they might worship Me.
Islam teaches that God created people to know and worship Him and to do good on earth. Life is a test, and what a person does in it decides their happiness in the afterlife.
Worship in Islam is wider than ritual. Honest work, caring for family, helping a neighbour, being kind to animals and even a smile are counted as worship when done for God's sake. Nothing is wasted: every good deed is written, and every difficulty, borne with patience, brings reward.
Muslims believe this life is short and the next is permanent. They are told to enjoy the good things God made lawful, to work, to marry and to take part in the world, while keeping in mind that they will return to God and answer for how they lived.
وَمَا خَلَقْتُ ٱلْجِنَّ وَٱلْإِنسَ إِلَّا لِيَعْبُدُونِ ﴿٥٦﴾
I created the jinn and humankind only that they might worship Me.
ٱلَّذِى خَلَقَ ٱلْمَوْتَ وَٱلْحَيَوٰةَ لِيَبْلُوَكُمْ أَيُّكُمْ أَحْسَنُ عَمَلًۭا ۚ وَهُوَ ٱلْعَزِيزُ ٱلْغَفُورُ ﴿٢﴾
Who hath created life and death that He may try you which of you is best in conduct; and He is the Mighty, the Forgiving,
وَإِذْ قَالَ رَبُّكَ لِلْمَلَٰٓئِكَةِ إِنِّى جَاعِلٌۭ فِى ٱلْأَرْضِ خَلِيفَةًۭ ۖ قَالُوٓا۟ أَتَجْعَلُ فِيهَا مَن يُفْسِدُ فِيهَا وَيَسْفِكُ ٱلدِّمَآءَ وَنَحْنُ نُسَبِّحُ بِحَمْدِكَ وَنُقَدِّسُ لَكَ ۖ قَالَ إِنِّىٓ أَعْلَمُ مَا لَا تَعْلَمُونَ ﴿٣٠﴾
And when thy Lord said unto the angels: Lo! I am about to place a viceroy in the earth, they said: Wilt thou place therein one who will do harm therein and will shed blood, while we, we hymn Thy praise and sanctify Thee? He said: Surely I know that which ye know not.
The authentic hadith behind this answer, from Sahih al-Bukhari, Sahih Muslim and the Sunan with the grade of the scholars of hadith. Open a reference to read it in the hadith library of this site.
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ عَبْدِ الرَّحْمَنِ، أَخْبَرَنَا الأَسْوَدُ بْنُ عَامِرٍ، حَدَّثَنَا أَبُو بَكْرِ بْنُ عَيَّاشٍ، عَنِ الأَعْمَشِ، عَنْ سَعِيدِ بْنِ عَبْدِ اللَّهِ بْنِ جُرَيْجٍ، عَنْ أَبِي بَرْزَةَ الأَسْلَمِيِّ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " لاَ تَزُولُ قَدَمَا عَبْدٍ يَوْمَ الْقِيَامَةِ حَتَّى يُسْأَلَ عَنْ عُمْرِهِ فِيمَا أَفْنَاهُ وَعَنْ عِلْمِهِ فِيمَا فَعَلَ وَعَنْ مَالِهِ مِنْ أَيْنَ اكْتَسَبَهُ وَفِيمَا أَنْفَقَهُ وَعَنْ جِسْمِهِ فِيمَا أَبْلاَهُ " . قَالَ هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ . وَسَعِيدُ بْنُ عَبْدِ اللَّهِ بْنِ جُرَيْجٍ هُوَ بَصْرِيٌّ وَهُوَ مَوْلَى أَبِي بَرْزَةَ وَأَبُو بَرْزَةَ اسْمُهُ نَضْلَةُ بْنُ عُبَيْدٍ .
حَدَّثَنَا الْمَكِّيُّ بْنُ إِبْرَاهِيمَ، أَخْبَرَنَا عَبْدُ اللَّهِ بْنُ سَعِيدٍ ـ هُوَ ابْنُ أَبِي هِنْدٍ ـ عَنْ أَبِيهِ، عَنِ ابْنِ عَبَّاسٍ ـ رضى الله عنهما ـ قَالَ قَالَ النَّبِيُّ صلى الله عليه وسلم " نِعْمَتَانِ مَغْبُونٌ فِيهِمَا كَثِيرٌ مِنَ النَّاسِ، الصِّحَّةُ وَالْفَرَاغُ ". قَالَ عَبَّاسٌ الْعَنْبَرِيُّ حَدَّثَنَا صَفْوَانُ بْنُ عِيسَى، عَنْ عَبْدِ اللَّهِ بْنِ سَعِيدِ بْنِ أَبِي هِنْدٍ، عَنْ أَبِيهِ، سَمِعْتُ ابْنَ عَبَّاسٍ، عَنِ النَّبِيِّ صلى الله عليه وسلم مِثْلَهُ.
This answer follows the mainstream Sunni understanding and is general learning, not a fatwa. Where Muslims differ, the answer says so. Have a question of your own? Write to us.