If one does not embrace Islam truly but does so by compulsion or for fear of being killed (then that man is not a believer)
بَابُ إِذَا لَمْ يَكُنِ الإِسْلاَمُ عَلَى الْحَقِيقَةِ وَكَانَ عَلَى الاِسْتِسْلاَمِ أَوِ الْخَوْفِ مِنَ الْقَتْلِ
Sahih al-Bukhari, Book of Belief(view book)
Sahih al-Bukhari 27
Narrated Sa'd:
Allah's Apostle distributed (Zakat) amongst (a group of) people while I was sitting there but Allah's Apostle left a man whom I thought the best of the lot. I asked, "O Allah's Apostle! Why have you left that person? By Allah I regard him as a faithful believer." The Prophet commented: "Or merely a Muslim." I remained quiet for a while, but could not help repeating my question because of what I knew about him. And then asked Allah's Apostle, "Why have you left so and so? By Allah! He is a faithful believer." The Prophet again said, "Or merely a Muslim." And I could not help repeating my question because of what I knew about him. Then the Prophet ﷺ said, "O Sa'd! I give to a person while another is dearer to me, for fear that he might be thrown on his face in the Fire by Allah."
حَدَّثَنَا أَبُو الْيَمَانِ، قَالَ أَخْبَرَنَا شُعَيْبٌ، عَنِ الزُّهْرِيِّ، قَالَ أَخْبَرَنِي عَامِرُ بْنُ سَعْدِ بْنِ أَبِي وَقَّاصٍ، عَنْ سَعْدٍ، رضى الله عنه أَنَّ رَسُولَ اللَّهِ ﷺ أَعْطَى رَهْطًا وَسَعْدٌ جَالِسٌ، فَتَرَكَ رَسُولُ اللَّهِ ﷺ رَجُلاً هُوَ أَعْجَبُهُمْ إِلَىَّ فَقُلْتُ يَا رَسُولَ اللَّهِ مَا لَكَ عَنْ فُلاَنٍ فَوَاللَّهِ إِنِّي لأَرَاهُ مُؤْمِنًا. فَقَالَ " أَوْ مُسْلِمًا ". فَسَكَتُّ قَلِيلاً، ثُمَّ غَلَبَنِي مَا أَعْلَمُ مِنْهُ فَعُدْتُ لِمَقَالَتِي فَقُلْتُ مَا لَكَ عَنْ فُلاَنٍ فَوَاللَّهِ إِنِّي لأَرَاهُ مُؤْمِنًا فَقَالَ " أَوْ مُسْلِمًا ". ثُمَّ غَلَبَنِي مَا أَعْلَمُ مِنْهُ فَعُدْتُ لِمَقَالَتِي وَعَادَ رَسُولُ اللَّهِ ﷺ ثُمَّ قَالَ " يَا سَعْدُ، إِنِّي لأُعْطِي الرَّجُلَ وَغَيْرُهُ أَحَبُّ إِلَىَّ مِنْهُ، خَشْيَةَ أَنْ يَكُبَّهُ اللَّهُ فِي النَّارِ ". وَرَوَاهُ يُونُسُ وَصَالِحٌ وَمَعْمَرٌ وَابْنُ أَخِي الزُّهْرِيِّ عَنِ الزُّهْرِيِّ.