The Prophet ﷺ met him on one of the roads of Madinah while he was in a state of major ritual impurity, so he slipped away and went to perform the ritual bath. The Prophet ﷺ noticed his absence, and when he returned, the Prophet ﷺ asked, "Where were you, Abu Hurayrah?"He replied, "Messenger of Allah, you met me while I was in a state of major impurity, and I disliked sitting with you until I had bathed."The Prophet ﷺ said, "Glory be to Allah! The believer is never impure."
أخبرنا حميد بن مسعدة قال حدثنا بشر وهو ابن المفضل قال حدثنا حميد عن بكر عن أبي رافع
أن النبي ﷺ لقيه في طريق من طرق المدينة وهو جنب فانسل عنه فاغتسل ففقده النبي ﷺ فلما جاء قال أين كنت يا أبا هريرة قال يا رسول الله إنك لقيتني وأنا جنب فكرهت أن أجالسك حتى أغتسل فقال سبحان الله إن المؤمن لا ينجس
Bukhari transmitted it, ghusl, chapter on the sweat of one in a state of major ritual impurity and that a Muslim is not impure, hadith no. 283, and Muslim, hadith no. 371. See the previous hadith from the report of Humayd Tawil, with the same wording. It is also in Kubra, hadith no. 263.