In The Name of Allaah, The Most Merciful, The Bestower of Mercy
By Allaah, [to attain] sincerity one must strive. The hardest thing which many scholars used to express grief about is [fear] of being overcome by one’s soul and thus leads to lack of sincerity to Allaah [The Blessed and Exalted]. Your soul can overcome you and diverts from [sincerity] because you desire some fame and praise. One should exert himself, strive and bear hardship to direct this soul to the truth- towards sincerity to Allaah. [The Messenger (sallal laahu alayhi wasallam) said]: Verily, deeds are based on intention and every person will have what he intended.”
So, whoever desires worldly gain through his knowledge or acts of worship, just as the one who migrated [from a land of kufr to a land of Islaam] only to marry a woman and desires wealth, then he obtains nothing from his migration, except for that which he migrated. The thing desired is known to you, so you miss Allaah’s reward.
Marhaban Yaa Taalibal Ilm’ page 122. abridged & slightly paraphrased