In the Name of Allah, the Gracious, the Merciful
Imam al-Nawawi records in his book Meadows of the Righteous:
باب تغليظ عقوبة من أمر بمعروف أو نهى عن منكر وخالف قوله فعله
Chapter on the severe punishment of one who enjoins good or forbids evil in contradiction to his words and actions.
Source: Riyāḍ al-Ṣāliḥīn 1/86
Allah Almighty said:
أَتَأْمُرُونَ النَّاسَ بِالْبِرِّ وَتَنسَوْنَ أَنفُسَكُمْ وَأَنتُمْ تَتْلُونَ الْكِتَابَ ۚ أَفَلَا تَعْقِلُونَ
Do you preach righteousness and fail to practice it yourselves, although you read the Scripture? Do you not understand?
Surat al-Baqarah 2:44
And Allah said:
يَا أَيُّهَا الَّذِينَ آمَنُوا لِمَ تَقُولُونَ مَا لَا تَفْعَلُونَ كَبُرَ مَقْتًا عِندَ اللَّهِ أَن تَقُولُوا مَا لَا تَفْعَلُونَ
O believers! Why do you say what you do not do? How despicable it is in the sight of Allah that you say what you do not do!
Surat al-Saff 61:2-3
And Allah said:
قَالَ يَا قَوْمِ أَرَأَيْتُمْ إِن كُنتُ عَلَىٰ بَيِّنَةٍ مِّن رَّبِّي وَرَزَقَنِي مِنْهُ رِزْقًا حَسَنًا وَمَا أُرِيدُ أَنْ أُخَالِفَكُمْ إِلَىٰ مَا أَنْهَاكُمْ عَنْهُ إِنْ أُرِيدُ إِلَّا الْإِصْلَاحَ مَا اسْتَطَعْتُ وَمَا تَوْفِيقِي إِلَّا بِاللَّهِ عَلَيْهِ تَوَكَّلْتُ وَإِلَيْهِ أُنِيبُ
Shu’ayb said, ‘O my people! Consider if I stand on a clear proof from my Lord and He has blessed me with a good provision from Him. I do not want to do what I am forbidding you from. I only intend reform to the best of my ability. My success comes only through Allah. In Him I trust and to Him I turn.’
Surat Hud 11:88
Usamah ibn Zayd reported: The Messenger of Allah, peace and blessings be upon him, said:
يُؤْتَى بِالرَّجُلِ يَوْمَ الْقِيَامَةِ فَيُلْقَى فِي النَّارِ فَتَنْدَلِقُ أَقْتَابُ بَطْنِهِ فَيَدُورُ بِهَا كَمَا يَدُورُ الْحِمَارُ بِالرَّحَى فَيَجْتَمِعُ إِلَيْهِ أَهْلُ النَّارِ فَيَقُولُونَ يَا فُلَانُ مَا لَكَ أَلَمْ تَكُنْ تَأْمُرُ بِالْمَعْرُوفِ وَتَنْهَى عَنْ الْمُنْكَرِ فَيَقُولُ بَلَى قَدْ كُنْتُ آمُرُ بِالْمَعْرُوفِ وَلَا آتِيهِ وَأَنْهَى عَنْ الْمُنْكَرِ وَآتِيهِ
A man will be brought on the Day of Resurrection and be cast into the Hellfire, and his intestines will pour forth in Hell. He will go around them as a donkey around a millstone. The people of Hell will gather around him and say, ‘What has happened to you? Were you not enjoining good and forbidding evil?’ He will say, ‘Of course, I used to enjoin good but I did not practice it myself, and I used to forbid evil but I practiced it myself.’
Source: Ṣaḥīḥ al-Bukhārī 3267, Grade: Muttafaqun Alayhi
Success comes from Allah, and Allah knows best.