كتاب صلاة المسافرين وقصرها
6  
The Book of Prayer - Travellers
(33)
Chapter: The command to keep refreshing one’s knowledge of the Qur’an and that it is disliked to say I have forgotten such-and-such a verse, but it is permissible to say I have been caused to forget
(33)
باب الأَمْرِ بِتَعَهُّدِ الْقُرْآنِ وَكَرَاهَةِ قَوْلِ نَسِيتُ آيَةَ كَذَا. وَجَوَازِ قَوْلِ أُنْسِيتُهَا
Sahih Muslim 790 a

'Abdullah reported Allah's Messenger (ﷺ) as saying:

What a wretched person is he amongst them who says: I have forgotten such and such a verse. (He should instead of using this expression say): I have been made to forget it. Try to remember the Qur'an for it is more apt to escape from men's minds than a hobbled camel.
وَحَدَّثَنَا زُهَيْرُ بْنُ حَرْبٍ، وَعُثْمَانُ بْنُ أَبِي شَيْبَةَ، وَإِسْحَاقُ بْنُ إِبْرَاهِيمَ، قَالَ إِسْحَاقُ أَخْبَرَنَا وَقَالَ الآخَرَانِ، حَدَّثَنَا جَرِيرٌ، عَنْ مَنْصُورٍ، عَنْ أَبِي وَائِلٍ، عَنْ عَبْدِ اللَّهِ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ بِئْسَمَا لأَحَدِهِمْ يَقُولُ نَسِيتُ آيَةَ كَيْتَ وَكَيْتَ بَلْ هُوَ نُسِّيَ اسْتَذْكِرُوا الْقُرْآنَ فَلَهُوَ أَشَدُّ تَفَصِّيًا مِنْ صُدُورِ الرِّجَالِ مِنَ النَّعَمِ بِعُقُلِهَا ‏"‏ ‏.‏
Reference : Sahih Muslim 790a
In-book reference : Book 6, Hadith 269
USC-MSA web (English) reference : Book 4, Hadith 1724
  (deprecated numbering scheme)