The Messenger of Allah ﷺ said, "When Allah intends mercy for a nation among His servants, He takes the soul of their prophet before them, making him a forerunner and predecessor for them. But when He intends the destruction of a nation, He punishes them while their prophet is still alive, and He comforts the prophet's eye by their destruction, since they had rejected him and disobeyed his command."
قال رسول الله ﷺ: إن الله إذا أراد رحمة أمة من عباده قبض نبيها قبلها، فجعله لها فرطا وسلفا، وإذا أراد هلكة أمة عذبها، ونبيها حي، فأقر عينه بهلكتها حين كذبوه، وعصوا أمره.
Ibn Hibban (6647) narrated it from Muhammad bin Musayab bin Ishaq, who said, Ibrahim bin Saeed Jawhari told us, Abu Usama told us, Burayd told us, from Abu Burda, from Abu Musa, and he related it.Muslim mentioned it in the Book of Virtues (2288), saying, "It was related to me from Abu Usama," and among those who narrated this from him was Ibrahim bin Saeed Jawhari, who said, Abu Usama told us, Burayd bin Abdullah told me with his chain of transmission, similarly.Maziri and Qadi Iyad said, "This is among the disconnected hadiths, for he did not name the one who related it to him from Abu Usama."I say, Ibrahim bin Saeed was among his teachers, but since he did not hear this particular hadith from him, he mentioned it as disconnected, while Ibn Hibban connected it, as you can see.