عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ رَضِيَ اللَّهُ عَنْهُمَا قَالَ أَخَذَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ بِبَعْضِ جَسَدِي فَقَالَ ((اعْبُدِ اللَّهَ كَأَنَّكَ تَرَاهُ وَكُنْ فِي الدُّنْيَا كَأَنَّكَ غَرِيبٌ أَوْ عَابِرُ سَبِيلٍ))
Hazrat Abdullah bin Umar (may Allah be pleased with them both) says: The Messenger of Allah (peace and blessings be upon him and his family) took hold of a part of my body and said: Worship Allah as if you are seeing Him, and be in this world as if you are a stranger or a traveler.
Brief Explanation
Benefits: … Just as a person, while traveling or among strangers, neither becomes attached nor is particularly concerned about his own existence, so is the case with this world; it is not a place to become attached to, and here one should not care for anyone except Allah, the Exalted, and His Messenger.
Worship Allah in such a manner as if you are seeing Him. In the Hadith of Jibril, this state of the worshipper is called ihsan.
Hafiz Ibn Hajar rahimahullah said: The meaning and concept of this manner of worship, or ihsan, is that worship should be made sincere, with great attention to humility and submissiveness, complete focus should be directed towards Him during worship, and the heart should be filled with fear of the True Deity. In the hadith of Sayyiduna Abu Darda radi Allahu anhu, two states are mentioned. The highest state and condition is that the worshipper becomes so overwhelmed by the thought that he is seeing Allah, the Exalted, with his heart, and this thought becomes so strong that eventually it feels as if he is seeing the Truth, the Exalted, with his own eyes. This is the meaning of "ka'annaka tarahu" (as if you see Him). The second state is that at the very least, he should firmly keep in mind the reality that Allah, the Exalted, is aware of his every action; this is the meaning of "fa-innahu yaraka" (for indeed He sees you). The result of both these states is that one attains knowledge of Allah, the Exalted, and awe of Him is produced in the heart.
Imam Nawawi rahimahullah said: Its meaning is that when you and Allah, the Exalted, are seeing each other, you will observe all manners and etiquettes. In any case, you are not seeing Him, while He is seeing you at all times; therefore, you should strive for excellence in worship. The implied meaning of this hadith is: If you are not seeing Allah, the Exalted, then still continue to worship in a good manner, because He is certainly seeing you. This part of the Hadith of Jibril—"Worship Allah as if you see Him, and if you do not see Him, then indeed He sees you"—is a great principle from the fundamentals of the religion and an important rule among the rules of the Muslims. It is the support of the truthful (siddiqin), the goal of the seekers (salikin), the treasure of the knowers (arifin), and the habit of the righteous (salihin). This phrase is among the comprehensive words (jawami‘ al-kalim) that were granted to the Noble Prophet sallallahu alayhi wa sallam. Reflect: the scholars of investigation have considered it recommended to sit in the gatherings of righteous people, so that, out of respect for them and feeling shame before them, one may avoid faults and defects. Then what should be thought about the person whom Allah, the Exalted, is aware of his outward and hidden states? (Fath al-Bari: 1/160)
Imam Nawawi rahimahullah said: Its meaning is that when you and Allah, the Exalted, are seeing each other, you will observe all manners and etiquettes. In any case, you are not seeing Him, while He is seeing you at all times; therefore, you should strive for excellence in worship. The implied meaning of this hadith is: If you are not seeing Allah, the Exalted, then still continue to worship in a good manner, because He is certainly seeing you. This part of the Hadith of Jibril—"Worship Allah as if you see Him, and if you do not see Him, then indeed He sees you"—is a great principle from the fundamentals of the religion and an important rule among the rules of the Muslims. It is the support of the truthful (siddiqin), the goal of the seekers (salikin), the treasure of the knowers (arifin), and the habit of the righteous (salihin). This phrase is among the comprehensive words (jawami‘ al-kalim) that were granted to the Noble Prophet sallallahu alayhi wa sallam. Reflect: the scholars of investigation have considered it recommended to sit in the gatherings of righteous people, so that, out of respect for them and feeling shame before them, one may avoid faults and defects. Then what should be thought about the person whom Allah, the Exalted, is aware of his outward and hidden states? (Fath al-Bari: 1/160)