القرآن المبين

سورة محمد · 47:28

ذَٰلِكَ بِأَنَّهُمُ اتَّبَعُوا مَا أَسْخَطَ اللَّهَ وَكَرِهُوا رِضْوَانَهُ فَأَحْبَطَ أَعْمَالَهُمْ

This is because they follow whatever displeases Allah and hate whatever pleases Him, so He has rendered their deeds void.