Anas bin Malik reported,

The Messenger of Allah ﷺ visited a Muslim man who had grown so frail that he resembled a small chick. The Messenger of Allah ﷺ asked him, "Were you supplicating for something or asking Allah for anything?"The man replied, "Yes. I used to say, 'O Allah, whatever punishment You intend to impose on me in the Hereafter, hasten it for me in this world.'"The Messenger of Allah ﷺ said, "Glory be to Allah! You cannot bear it, nor are you capable of enduring it. Why did you not say, 'O Allah, "Grant us good in this world and good in the Hereafter, and protect us from the punishment of the Fire" [Baqarah 2:201]'?"He then prayed to Allah for him, and Allah cured him.

Muslim 6835

Sahih

حدثنا أبو الخطاب زياد بن يحيى الحساني حدثنا محمد بن أبي عدي عن حميد عن ثابت

عن أنس

أن رسول الله ﷺ عاد رجلا من المسلمين قد خفت فصار مثل الفرخ فقال له رسول الله ﷺ هل كنت تدعو بشيء أو تسأله إياه قال نعم كنت أقول اللهم ما كنت معاقبي به في الآخرة فعجله لي في الدنيا فقال رسول الله ﷺ سبحان الله لا تطيقه أو لا تستطيعه أفلا قلت اللهم {آتنا في الدنيا حسنة وفي الآخرة حسنة وقنا عذاب النار} قال فدعا الله له فشفاه

مسلم 6835صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Remembrance, supplication, Tawba, and seeking forgiveness
Chapter
Disliking supplication for hastening punishment in this world
Numbering
Darussalam 6835
Muslim 6835