كتاب فضائل الصحابة رضى الله تعالى عنهم
44  
The Book of the Merits of the Companions
(22)
Chapter: The Virtues Of 'Abdullah Bin Mas'ud And His Mother (RA)
(22)
باب مِنْ فَضَائِلِ عَبْدِ اللَّهِ بْنِ مَسْعُودٍ وَأُمِّهِ رَضِيَ اللَّهُ تَعَالَى عَنْهُمَا ‏‏
Sahih Muslim 2463

Abdullah reported:

By Him besides Whom there is no god, there is no chapter in the Book of Allah about which I do not know as to where it was revealed and there is no verse about which I do not know in what context it was revealed, and if I were to know of one having a better understanding of the Book of Allah than I (and I could reach him) on the back of the mule, I would have definitely gone to him on camel's back.
حَدَّثَنَا أَبُو كُرَيْبٍ، حَدَّثَنَا يَحْيَى بْنُ آدَمَ، حَدَّثَنَا قُطْبَةُ، عَنِ الأَعْمَشِ، عَنْ مُسْلِمٍ، عَنْ مَسْرُوقٍ، عَنْ عَبْدِ اللَّهِ، قَالَ وَالَّذِي لاَ إِلَهَ غَيْرُهُ مَا مِنْ كِتَابِ اللَّهِ سُورَةٌ إِلاَّ أَنَا أَعْلَمُ حَيْثُ نَزَلَتْ وَمَا مِنْ آيَةٍ إِلاَّ أَنَا أَعْلَمُ فِيمَا أُنْزِلَتْ وَلَوْ أَعْلَمُ أَحَدًا هُوَ أَعْلَمُ بِكِتَابِ اللَّهِ مِنِّي تَبْلُغُهُ الإِبِلُ لَرَكِبْتُ إِلَيْهِ ‏.‏
Reference : Sahih Muslim 2463
In-book reference : Book 44, Hadith 163
USC-MSA web (English) reference : Book 31, Hadith 6023
  (deprecated numbering scheme)