اللَّهُمَّ إِنِّي أَسْأَلُكَ فِعْلَ الْخَيْرَاتِ وَتَرْكَ الْمُنْكَرَاتِ وَحُبَّ الْمَسَاكِينِ وَأَنْ تَغْفِرَ لِي وَتَرْحَمَنِي وَإِذَا أَرَدْتَ فِتْنَةَ قَوْمٍ فَتَوَفَّنِي غَيْرَ مَفْتُونٍ أَسْأَلُكَ حُبَّكَ وَحُبَّ مَنْ يُحِبُّكَ وَحُبَّ عَمَلٍ يُقَرِّبُ إِلَى حُبِّكَ
Allaahumma innii as’aluka fi’lal-khayraat(i), wa tarkal-munkaraat(i), wa hubbal-masaakiin(i), wa an taghfira lii wa tarhamanii, wa idhaa aradtta biqawmin fitnatan fa tawaffanii ghayra maftuun(in), wa as’aluka hubbaka wa hubba man yuhibbuk(a), wa hubba ‘amalin yuqarribunii ilaa hubbik. (Mu’adh ibn Jabal. Sunan at-Tirmidhi #3259: Thawbaan ibn Bajdad. Mustadrak Hakim #132/1932)
O Allah, I beg You to enable me to do good deeds, to shun bad deeds, and to love the poor. (I beg You to) forgive me and have mercy on me. And when You plan tribulations for a people cause me to die without being put to trial. I beg for Your love, and the love of the one who loves You, and the love of such deeds that will bring me closer to Your love.
Your love: Here it could mean both my love for You and Your love for me (Tuhfah al-Ahwadhi).
This du’aa was made by Prophet Muhammad (sallallahu alayhi wa sallem) at a special occasion when Allah Ta’aala invited him to make a du’aa. The details reported in Sunan at-Tirmidhi are as follows:
Once the Prophet (sallallahu alayhi wa sallem) was overtaken by sleep in the middle of his Tahajjud salaat (nightly prayer) whereby he experienced a vision in which he had a conversation with Allah Ta’aala. Allah Ta’aala asked him, what were the high-ranking angles discussing. He responded that he did not know. This happened three times. After that, the Prophet (sallallahu alayhi wa sallem) in his vision felt His Palm on his chest and shoulders and suddenly everything became clear to him. Allah Ta’aala repeated the question and this time the Prophet (sallallahu alayhi wa sallem) said that they were discussing the actions that expiate sins. Allah Ta’aala asked, “What are they?” He replied, “Walking (to the masjid) to attend congregational salaat, sitting in the masjid after the salaat, and perfecting the wuduu in difficult conditions.” Allah Ta’aala asked, “What else?” The Prophet (sallallahu alayhi wa sallem) said, “Feeding others, talking gently, and praying at night when the people are asleep.” Then, Allah Ta’aala said, “Ask.” And in response, the Prophet (sallallahu alayhi wa sallem) made this du’aa. After narrating this incident, the Prophet (sallallahu alayhi wa sallem) told his Companions, “This (vision) is certainly true, so remember it (i.e. this vision and all its lessons) and teach it.”
(Sources: Khalid Baig’s translation and commentary to du’aa #65 in the Accepted Whispers: Munajat-e-Maqbul, Arabic du’aa from Jami` at-Tirmidhi 3543, Chapters on Tafsir)