In The Name of Allaah, The Most Merciful, The Bestower of Mercy.
Imaam Ibn Qudaamah [rahimahullaah] said:
In most cases envy occurs between contemporaries, peers, brothers and cousins, because of the conflicting goals of everyone which lead to discord and enmity. And due to this, you will find a scholar envying another scholar, but he will not envy a worshipper; a worshipper envying another worshipper, but he will not envy a scholar; a trader envying another trader and a cobbler envying another cobbler, because they have conflicting goals. The basis of this affair is due to love of the worldly things, for indeed the worldly things are restricted for those who compete for it; but as for the afterlife, there is no restriction within it, for indeed the one who loves knowledge and awareness of Allaah, knowledge and awareness regarding Allaah’s angels, Allaah’s Prophets and Allaah’s Mighty Dominion over the heavens and the earth, he will not envy others after being acquainted with these affairs, because they are not restricted by one another; rather one particular individual scholar is known by thousands of scholars, and they rejoice due to the understanding he has.
This is why there is no envy between the [upright] scholars of the religion, because their aim is to acquire knowledge and awareness of Allaah [Glorified be He and free is He from all imperfections], which is a vast affair. Their [i.e. the upright scholars] goal is to acquire a high status in the sight of Allaah and that which Allaah has kept in the afterlife is unlimited, because Allaah’s loftiest blessing is the pleasure of meeting Him, which can neither be prevented nor restricted, nor can some competitors in the affair make it restricted for others; rather harmony increases as the competitors increase; but if wealth and status become the goal of the scholars, they will envy one another.
The difference between knowledge and wealth is that wealth does not remain in the hands of one person; but as for knowledge, it settles in the heart of a scholar and in the heart of the one taught by the scholar, whilst still remaining in the heart of the scholar. Therefore, whoever contemplates on the Greatness of Allaah and His Mighty Dominion [i.e. by pondering upon what Allaah has created and the revelation He has sent down], it will become the greatest pleasure for him than every other blessing, because neither can he be prevented nor restricted in that. And he will not harbour any envy in his heart towards anyone, because if others were acquainted with what he is acquainted with, it will still not reduce his pleasure in the affair.
You do not find people overcrowding to view the beauty of the sky because it is vast and unrestricted; therefore, if you are merciful to yourself, then it is obligated on you to seek after a bliss in whose path there is no obstruction and a pleasure that will not cease [i.e. the competition for this worldly life is restricted for its competitors and will come to an end, whereas the afterlife is unrestricted.] And this cannot be found in this worldly life, except by acquainting oneself with knowledge and awareness of Allaah and the amazing nature of His Dominion [over everything].
[An Excerpt from ‘Mukhtasar Minhaaj Al-Qaasideen’ page: 199-201. slightly paraphrased]