Messenger of Allah ﷺ sent ten persons to bring the enemy's secrets and Khubaib Al-Ansari was one of them. 'Ubaidullah bin 'Iyad told me that the daughter of Al-Harith told him that when they gathered (to kill Khubaib Al Ansari) he asked for a razor to clean his pubic region, and when they had taken him outside the sanctuary of Mecca in order to kill him, he said in verse, "I don't care if I am killed as a Muslim, on any side (of my body) I may be killed in Allah's Cause; for that is for the sake of Allah's very Self; and if He will, He will bestow His Blessings upon the torn pieces of my body." Then Ibn Al-Harith killed him, and the Prophet ﷺ informed his companions of the death of those (ten men) on the very day they were killed.
بَعَثَ رَسُولُ اللَّهِ ﷺ عَشْرَةً مِنْهُمْ خُبَيْبٌ الأَنْصَارِيُّ فَأَخْبَرَنِي عُبَيْدُ اللَّهِ بْنُ عِيَاضٍ أَنَّ ابْنَةَ الْحَارِثِ أَخْبَرَتْهُ أَنَّهُمْ حِينَ اجْتَمَعُوا اسْتَعَارَ مِنْهَا مُوسَى يَسْتَحِدُّ بِهَا فَلَمَّا خَرَجُوا مِنَ الْحَرَمِ لِيَقْتُلُوهُ قَالَ خُبَيْبٌ الأَنْصَارِيُّ وَلَسْتُ أُبَالِي حِينَ أُقْتَلُ مُسْلِمًا ** عَلَى أَيِّ شِقٍّ كَانَ لِلَّهِ مَصْرَعِي وَذَلِكَ فِي ذَاتِ الإِلَهِ وَإِنْ يَشَأْ ** يُبَارِكْ عَلَى أَوْصَالِ شِلْوٍ مُمَزَّعِ فَقَتَلَهُ ابْنُ الْحَارِثِ فَأَخْبَرَ النَّبِيُّ ﷺ أَصْحَابَهُ خَبَرَهُمْ يَوْمَ أُصِيبُوا