Mishkat al-Masabih 1323
عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ قَالَ: كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يُعَلِّمُنَا الِاسْتِخَارَةَ فِي الْأُمُورِ كَمَا يُعَلِّمُنَا السُّورَةَ مِنَ الْقُرْآنِ يَقُولُ: إِذَا هَمَّ أَحَدُكُمْ بِالْأَمْرِ فَلْيَرْكَعْ رَكْعَتَيْنِ مِنْ غَيْرِ الْفَرِيضَةِ ثُمَّ لْيَقُلْ: اللَّهُمَّ إِنِّي أَسْتَخِيرُكَ بِعِلْمِكَ وَأَسْتَقْدِرُكَ بِقُدْرَتِكَ وَأَسْأَلُكَ مِنْ فَضْلِكَ الْعَظِيمِ فَإِنَّك تَقْدِرُ وَلَا أقدر وَتعلم وَلَا أعلم وَأَنت علام الغيوب اللَّهُمَّ إِنَّ كُنْتَ تَعْلَمُ أَنَّ هَذَا الْأَمْرَ خَيْرٌ لِي فِي دِينِي وَمَعَاشِي وَعَاقِبَةِ أَمْرِي - أوقال فِي عَاجِلِ أَمْرِي وَآجِلِهِ - فَاقْدُرْهُ لِي وَيَسِّرْهُ لِي ثُمَّ بَارِكْ لِي فِيهِ وَإِنْ كُنْتَ تَعْلَمُ أَنَّ هَذَا الْأَمْرَ شَرٌّ لِي فِي دِينِي وَمَعَاشِي وَعَاقِبَةِ أَمْرِي - أَوْ قَالَ فِي عَاجِلِ أَمْرِي وَآجِلِهِ - فَاصْرِفْهُ عَنِّي وَاصْرِفْنِي عَنْهُ وَاقَدُرْ لِيَ الْخَيْرَ حَيْثُ كَانَ ثُمَّ أَرْضِنِي بِهِ . قَالَ: «ويسمي حَاجته» . رَوَاهُ البُخَارِيّ
From Jabir ibn ʿAbdullah, who said: The Messenger of Allah ﷺ used to teach us istikharah in [all] matters just as he taught us a surah of the Quran. He would say: "When one of you intends to do something, let him pray two rakʿahs other than the obligatory prayer, then let him say: 'O Allah, I seek Your guidance through Your knowledge, and I seek ability through Your power, and I ask You of Your great bounty, for You are able and I am not able, and You know and I do not know, and You are the Knower of the unseen. O Allah, if You know that this matter is good for me in my religion, my livelihood and the outcome of my affair' — or he said: 'in my affair now and later' — 'then decree it for me, make it easy for me, then bless me in it. And if You know that this matter is bad for me in my religion, my livelihood and the outcome of my affair' — or he said: 'in my affair now and later' — 'then turn it away from me and turn me away from it, and decree good for me wherever it may be, then make me pleased with it.'" He said: "And he names his need." Reported by al-Bukhari.