All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
The Hadeeth you referred to in the question was reported by Ibn Mas‘ood . It is a Marfoo‘ Hadeeth (i.e. a narration attributed to the Prophet, sallallaahu ‘alayhi wa sallam) that was cited in the Saheehs of Al-Bukhari and Muslim, and other books.
The Hadeeth reads, "It is a bad thing that some of you say, 'I have forgotten such-and-such verse of the Quran;' rather, he has been caused (by Allaah) to forget it. So you must keep on reciting the Quran because it escapes from the hearts of men faster than tied camels."
The Prophet, sallallaahu ‘alayhi wa sallam, dispraised saying "I have forgotten such-and-such verse of the Quran."
The scholars explained that the reason for this dispraise may be the following:
1. Some scholars were of the view that it is inappropriate to say so because it indicates neglect of that person and his indifference towards what he has memorized of the Noble Quran. Al-Haafith Ibn Hajar wrote: "The reason for dispraising saying such a statement is that it reflects neglect and failure to treasure the blessing of memorizing the Noble Quran. Forgetfulness takes place when the person neglects reciting and revising the Quran frequently. If someone recites it frequently in night prayers and in prayers in general, he will enhance his memorization and not forget it. When someone says 'I have forgotten such-and-such verse,' he is actually admitting his neglect. Thus, the dispraise is relevant to the neglect to revise and recite the Quran frequently which leads to forgetfulness." Ibn Hajar held that this opinion is the most valid one.
2. Others maintained that the reason for the dispraise is that the person attributes the forgetfulness to himself while no one has the ability to forget something himself; it is Allaah who causes the person to forget something. One should say, 'I have been made to forget such-and-such verses of the Quran,' meaning that Allaah had caused me to forget them. This is similar to the verses that read (what means):
{...And you threw not, [O Muhammad], when you threw, but it was Allaah who threw...} [Quran 8:17]
{Is it you who makes it grow, or are We the grower?} [Quran 56:64}
This opinion was adopted by Ibn Battaal ; he said, "Allaah, The Exalted, wanted to teach His slaves to attribute actions to their Creator as this implies acknowledgement of servitude to Him and total submission to His Will." [Fat-h Al-Baari]
3. Others held that it means that the Companions should not say that the Prophet, sallallaahu ‘alayhi wa sallam, had forgotten such-and-such verses of the Quran because it is Allaah, The Exalted, who causes him to forget the verses that were abrogated. They maintained that the meaning of the Hadeeth is as follows: Do not say about me, You have forgotten such-and-such verse of the Quran; Allaah, The Exalted, causes me to forget these verses which are abrogated. Allaah, The Exalted, says (what means): {We will make you recite, [O Muhammad], and you will not forget.* Except what Allaah should will.} [Quran 87:6-7] The verses that Allaah made the Prophet, sallallaahu ‘alayhi wa sallam, forget are the ones that were abrogated.
4. Some scholars held that this dispraise is peculiar to the time of the Prophet, sallallaahu ‘alayhi wa sallam. Al-Khattaabi wrote: "It is possible that this is peculiar to the time of the Prophet, sallallaahu ‘alayhi wa sallam; one means of abrogation was that the Prophet, sallallaahu ‘alayhi wa sallam, would forget the verse and then Allaah reveals another verse to replace it. The abrogated verse is cancelled and replaced with another one. Therefore, the person who memorizes the Quran should say 'I have been caused to forget such-and-such verse of the Quran,' so as not to indicate that the Quran that has been preserved by Allaah may be lost…. It is prescribed for the person to say, 'I was caused to forget such-and-such of the Quran', and not 'I have forgotten such-and-such of the Quran'. This is why the Prophet, sallallaahu ‘alayhi wa sallam, said: 'Why does anyone of the people say, 'I have forgotten such-and-such verses (of the Quran)?' He, in fact, is caused (by Allaah) to forget.' Moreover, he, sallallaahu ‘alayhi wa sallam, said: 'Keep refreshing your knowledge of the Quran, for I swear by Him in Whose Hand is the life of Muhammad that it is more liable to escape than camels would do from their tying ropes.' It means that the Quran escapes one who memorizes it faster than camels tied up, were one to neglect revising it properly." [End of quote]
For further benefit, please refer to Fatwa 107125 about the gravity of neglecting the Quran and forgetting what one has memorized of it.
Allaah Knows best.