The Shaytaan whispers to him that he is showing off so that he will give up doing acts of worship
Question

I am committed, praise be to Allah, to doing the obligatory acts of worship which Allah has enjoined, and I ask Allah to accept them. But recently I have started to experience waswaas (whispers from the Shaytaan) telling me that which I do is contaminated with elements of showing off, and Allah will never accept it. Sometimes I find myself hesitating to do some good things for fear of showing off.
Praise be to Allah.Just as the Shaytaan comes to the Muslim to make him admire his actions and show off to people, sometimes too he uses the opposite trick and makes a person think that he is showing off, so that he will not do it. 
In order to avoid both problems, we have to make sure that our intention is sound and make it sincerely and purely for the sake of Allah, and not worry after that about anything that the Shaytaan may come up with. 
Ibn Muflih al-Hanbali said – in a chapter on “We should not give up prescribed actions for fear of showing off”: One of the things that may happen to a person is that when he wants to do an act of worship, it occurs to him that he should not do it for fear of showing off. 
What he should do is not to pay attention to that. He can do that which Allah has commanded him to do or encouraged him to do, and seek the help of Allah, and trust in Him that he will do it in the manner prescribed in Islam. 
Shaykh Muhiy al-Deen al-Nawawi (may Allah have mercy on him) said: You should not give up remembering Allah verbally and in your heart because you think you may be showing off, rather you should remember Him in both ways, seeking thereby the Face of Allah. And he quoted al-Fudayl ibn ‘Iyaad (may Allah have mercy on him) as saying: Giving up a good deed for the sake of people is also showing off, and doing it for the sake of people is shirk. He said: If a person opens the door to noticing people and worrying about what they think then most of the doors to goodness will be closed to him.  
Abu’l-Faraj ibn al-Jawzi said: With regard to not doing good deeds for fear of showing off, if the motive for doing that deed is other than religious, then he should not do it because it is a sin. But if the motive for that is religious and it is sincerely for the sake of Allah, then he should not refrain from doing it, because the motive is religious. Similarly if he does not do a good deed for fear that it will be said that he is a show-off, then he should ignore that because it is one of the tricks of the Shaytaan. 
Ibraaheem al-Nakha’i said: If the Shaytaan comes to you when you are praying and says, “you are showing off,” then you should make it even longer. With regard to the reports narrated from one of the salaf, that he stopped worshipping for fear of showing off, this is to be understood as meaning that they felt that they were showing off, so they stopped it. And that is indeed the case. For example, al-A’mash said: I was with Ibraaheem al-Nakha’i when he was reading Qur’aan, and a man asked for permission to enter, so he covered the Mus-haf. He said: So that he will not think that I read it all the time. So if you should not stop doing an act of worship for fear of showing off, it is more appropriate that you should not stop it for fear of self admiration that may occur later on. 
Al-Adaab al-Shara’iyyah, 1/266-267 
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) was asked: 
When a person thinks of doing a good deed, the Shaytaan comes and whispers to him: “You want to do that to show off and have a good reputation,” so he backs off from doing that good deed. How can we avoid this? 
He replied: 
That can be avoided by seeking refuge with Allah from the accursed Shaytaan, and going ahead with the good deed. You should not pay attention to this waswaas (whisper from the Shaytaan) that puts you off doing good. If you turn away from this and seek refuge with Allah from the accursed Shaytaan, the problem will disappear, by Allah’s leave. 
Majmoo’ Fatawa al-Shaykh Ibn ‘Uthaymeen, question no. 277 
And Allah knows best.