كتاب الصيام
13  
The Book of Fasting
(22)
Chapter: The prohibition of fasting on the two days of 'Id
(22)
باب النَّهْىِ عَنْ صَوْمِ، يَوْمِ الْفِطْرِ وَيَوْمِ الأَضْحَى ‏‏
Sahih Muslim 1139

Ziyad b. Jubair reported that a person came to Ibn 'Umar (Allah be pleased with them) and said:

I had taken a vow that I would fast on the day (but it accidentally) synchronises with the day of Adha or the day of Fitr. Thereupon Ibn 'Umar (Allah be pleased with him) said: Allah, the Exalted, has commanded fulfilling of the vow, but the Messenger of Allah (ﷺ) has forbidden the observance of fast on this day.
وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا وَكِيعٌ، عَنِ ابْنِ عَوْنٍ، عَنْ زِيَادِ بْنِ جُبَيْرٍ، قَالَ جَاءَ رَجُلٌ إِلَى ابْنِ عُمَرَ - رضى الله عنهما - فَقَالَ إِنِّي نَذَرْتُ أَنْ أَصُومَ يَوْمًا فَوَافَقَ يَوْمَ أَضْحَى أَوْ فِطْرٍ ‏.‏ فَقَالَ ابْنُ عُمَرَ رضى الله عنهما أَمَرَ اللَّهُ تَعَالَى بِوَفَاءِ النَّذْرِ وَنَهَى رَسُولُ اللَّهِ صلى الله عليه وسلم عَنْ صَوْمِ هَذَا الْيَوْمِ ‏.‏
Reference : Sahih Muslim 1139
In-book reference : Book 13, Hadith 181
USC-MSA web (English) reference : Book 6, Hadith 2537
  (deprecated numbering scheme)