Al-Adab Al-Mufrad, Book 55, Hadith 1282 (In-Book) ⓘ
Abu'l-Malih reported from one of his people (who was a Companion) that the Prophet, may Allah bless him and grant him peace, said, "When Allah wants one of His slaves to die in some land, he makes him have a reason for going there."
حَدَّثَنَا سُلَيْمَانُ بْنُ حَرْبٍ، قَالَ: حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، عَنْ أَيُّوبَ، عَنْ أَبِي الْمَلِيحِ، عَنْ رَجُلٍ مِنْ قَوْمِهِ، وَكَانَتْ لَهُ صُحْبَةٌ، قَالَ: قَالَ النَّبِيُّ صلى الله عليه وسلم: إِذَا أَرَادَ اللَّهُ قَبْضَ عَبْدٍ بِأَرْضٍ جَعَلَ لَهُ بِهَا حَاجَةً.
also referenced under: Hadith 1282 (Reference) & Book 55, Hadith 1282 (English)