كتاب القدر
46  
The Book of Destiny
(1)
Chapter: How The Human Being Is Created, In His Mother's Womb, And His Provision, Lifespan And Deeds Are Written Down, And His Misery and Happiness
(1)
بَاب كَيْفِيَّةِ خَلْقِ الْآدَمِيِّ فِي بَطْنِ أُمِّهِ وَكِتَابَةِ رِزْقِهِ وَأَجَلِهِ وَعَمَلِهِ وَشَقَاوَتِهِ وَسَعَادَتِهِ
Sahih Muslim 112 b

Sahl b. Sa'd reported it from Allah's Messenger (ﷺ) that a person performs deeds like the deeds of the people of Paradise apparently before people and he would be amongst the dwellers of Hell and a person acts apparently like the people of Hell, but (in fact) he would be among the dwellers of Paradise.

حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، حَدَّثَنَا يَعْقُوبُ، - يَعْنِي ابْنَ عَبْدِ الرَّحْمَنِ الْقَارِيَّ - عَنْ أَبِي حَازِمٍ، عَنْ سَهْلِ بْنِ سَعْدٍ السَّاعِدِيِّ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ إِنَّ الرَّجُلَ لَيَعْمَلُ عَمَلَ أَهْلِ الْجَنَّةِ فِيمَا يَبْدُو لِلنَّاسِ وَهُوَ مِنْ أَهْلِ النَّارِ ‏.‏ وَإِنَّ الرَّجُلَ لَيَعْمَلُ عَمَلَ أَهْلِ النَّارِ فِيمَا يَبْدُو لِلنَّاسِ وَهُوَ مِنْ أَهْلِ الْجَنَّةِ ‏"‏ ‏.‏
Reference : Sahih Muslim 112b
In-book reference : Book 46, Hadith 19
USC-MSA web (English) reference : Book 33, Hadith 6408
  (deprecated numbering scheme)