Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:11071Abū Saʿīd b. Abū ʿAmr > Abū al-ʿAbbās al-Aṣam > al-Rabīʿ > al-Shāfiʿī > Ibn ʿUlayyah > Ḥammād > Ibrāhīm > ʿAlqamah > ʿAbdullāh / Ibn Masʿūd > Karih Shirāʾ al-Maṣāḥif And Bayʿahā

[Machine] Al-Shafi'i, may Allah have mercy on him, does not mean that some Iraqis say that there is no harm in buying and selling the Qur'an. And among the people there are those who do not see any harm in its sale, while we dislike its sale. The scholar said, "This dislike is based on the honor and respect of the Qur'an, so as not to belittle it by selling it or making it a trade." It has been narrated from Ibn Mas'ud that he permitted its sale, but the chain of narration is weak. And the saying of Ibn Abbas, "Buy the Qur'an and do not sell it, if this is true from him, indicates that it is permissible to sell it with dislike. And Allah knows best.  

البيهقي:١١٠٧١أَخْبَرَنَا أَبُو سَعِيدِ بْنُ أَبِي عَمْرٍو ثنا أَبُو الْعَبَّاسِ الْأَصَمُّ أنبأ الرَّبِيعُ قَالَ قَالَ الشَّافِعِيُّ عَنِ ابْنِ عُلَيَّةَ عَنْ حَمَّادٍ عَنْ إِبْرَاهِيمَ عَنْ عَلْقَمَةَ عَنْ عَبْدِ اللهِ يَعْنِي ابْنَ مَسْعُودٍ أَنَّهُ كَرِهَ شِرَاءَ الْمَصَاحِفِ وَبَيْعَهَا قَالَ

الشَّافِعِيُّ رَحِمَهُ اللهُ وَلَيْسُوا يَعْنِي بَعْضَ الْعِرَاقِيِّينَ يَقُولُونَ بِهَذَا لَا يَرَوْنَ بَأْسًا بِبَيْعِهَا وَشِرَائِهَا وَمِنَ النَّاسِ مَنْ لَا يَرَى بِشِرَائِهَا بَأْسًا وَنَحْنُ نَكْرَهُ بَيْعَهَا قَالَ الشَّيْخُ وَهَذِهِ الْكَرَاهَةُ عَلَى وَجْهِ التَّنْزِيهِ تَعْظِيمًا لِلْمُصْحَفِ عَنْ أَنْ يُبْتَذَلَ بِالْبَيْعِ أَوْ يُجْعَلَ مُتَّجَرًا وَرُوِيَ عَنِ ابْنِ مَسْعُودٍ أَنَّهُ رَخَّصَ فِيهِ وَإِسْنَادُهُ ضَعِيفٌ وَقَوْلُ ابْنِ عَبَّاسٍ اشْتَرِ الْمُصْحَفَ وَلَا تَبِعْهُ إِنْ صَحَّ ذَلِكَ عَنْهُ يَدُلُّ عَلَى جَوَازِ بَيْعِهِ مَعَ الْكَرَاهِيَةِ وَاللهُ أَعْلَمُ