He died in 52 AH.
Kaʿb related: “I was with the Prophet ﷺ at al-Hudaybiyah while we were in ihram and the idolaters had barred him from the Sanctuary. I had a thick forelock (1) and lice kept falling onto my face.
The Prophet ﷺ passed by me and asked, ‘Are the lice of your head troubling you?’ I replied, ‘Yes.’
He therefore ordered that it be shaved, and the verse concerning the compensatory offering (2) was revealed about me.”
Ibn Saʿd said: “He was a Balawī, an ally of the Khazraj.”
Al-Waqidī said: “He was actually one of them.” He further reported, on the authority of his informants, that they said: “Kaʿb ibn ʿUjrah’s acceptance of Islam was delayed.
He had an idol that he honored and would rub, and whenever he was invited to Islam he refused.
ʿUbādah ibn al-Ṣāmit was a close friend of his. One day ʿUbādah lay in wait for him; when Kaʿb went out, ʿUbādah entered with an adze and smashed the idol.
When Kaʿb returned he asked, ‘Who did this?’ They answered, ‘ʿUbādah.’
He stormed out in anger, but then reflected, went to ʿUbādah, and embraced Islam.”
Dimām ibn Ismāʿīl reported: “Yazīd ibn Abī Ḥabīb and Mūsā ibn Wardān narrated to me from Kaʿb ibn ʿUjrah, who said: ‘I came to the Prophet ﷺ one day and noticed that his appearance had changed.’”