Bulugh al-Maram 520
وَعَنْ أَبِي هُرَيْرَةَ - رضي الله عنه: أَنَّ رَسُولَ اللَّهِ - صلى الله عليه وسلم - قَالَ: «خَرَجَ سُلَيْمَانُ عَلَيْهِ السَّلَامُ يَسْتَسْقِي, فَرَأَى نَمْلَةً مُسْتَلْقِيَةً عَلَى ظَهْرِهَا رَافِعَةً قَوَائِمَهَا إِلَى السَّمَاءِ تَقُولُ: اللَّهُمَّ إِنَّا خَلْقٌ مِنْ خَلْقِكَ, لَيْسَ بِنَا غِنًى عَنْ سُقْيَاكَ, فَقَالَ: ارْجِعُوا لَقَدْ سُقِيتُمْ بِدَعْوَةِ غَيْرِكُمْ». رَوَاهُ أَحْمَدُ وَصَحَّحَهُ الْحَاكِمُ.
Abu Hurayrah, may Allah be pleased with him, [reported] that the Messenger of Allah ﷺ said: "Sulayman, peace be upon him, went out to pray for rain and saw an ant lying on its back, raising its legs towards the sky, saying: 'O Allah, we are one of Your creations; we cannot do without Your rain.' So he said: 'Go back, for you have been given rain through the supplication of another.'" Reported by Ahmad, and al-Hakim graded it sahih.