Sunan an-Nasa'i 1011
It was narrated that Ibn 'Abbas said:
Concerning the saying of Allah, the Mighty and Sublime: "And offer your salah (prayer) neither aloud nor in a low voice"- It was revealed when the Messenger of Allah ﷺ was still (preaching) in secret in Makkah. When he led his companions in prayer, he would raise his voice" -(One of the narrators) Ibn Mani' said: He would recite the Quran out loud"- "And when the idolators heard his voice they would insult the Quran, and the One Who revealed it, and the one who brought it. So Allah, the Mighty and Sublime, said to His Prophet ﷺ: And offer your salah (prayer) neither aloud that is, such that the idolators can hear your recitation and insult the Quran; nor in a low voice, so that your companions cannot hear; but follow a way between."
أَخْبَرَنَا أَحْمَدُ بْنُ مَنِيعٍ، وَيَعْقُوبُ بْنُ إِبْرَاهِيمَ الدَّوْرَقِيُّ، قَالاَ حَدَّثَنَا هُشَيْمٌ، قَالَ حَدَّثَنَا أَبُو بِشْرٍ، جَعْفَرُ بْنُ أَبِي وَحْشِيَّةَ - وَهُوَ ابْنُ إِيَاسٍ - عَنْ سَعِيدِ بْنِ جُبَيْرٍ، عَنِ ابْنِ عَبَّاسٍ، فِي قَوْلِهِ عَزَّ وَجَلَّ { وَلاَ تَجْهَرْ بِصَلاَتِكَ وَلاَ تُخَافِتْ بِهَا } قَالَ نَزَلَتْ وَرَسُولُ اللَّهِ ﷺ مُخْتَفٍ بِمَكَّةَ فَكَانَ إِذَا صَلَّى بِأَصْحَابِهِ رَفَعَ صَوْتَهُ - وَقَالَ ابْنُ مَنِيعٍ يَجْهَرُ بِالْقُرْآنِ - وَكَانَ الْمُشْرِكُونَ إِذَا سَمِعُوا صَوْتَهُ سَبُّوا الْقُرْآنَ وَمَنْ أَنْزَلَهُ وَمَنْ جَاءَ بِهِ فَقَالَ اللَّهُ عَزَّ وَجَلَّ لِنَبِيِّهِ ﷺ { وَلاَ تَجْهَرْ بِصَلاَتِكَ } أَىْ بِقِرَاءَتِكَ فَيَسْمَعُ الْمُشْرِكُونَ فَيَسُبُّوا الْقُرْآنَ { وَلاَ تُخَافِتْ بِهَا } عَنْ أَصْحَابِكَ فَلاَ يَسْمَعُوا { وَابْتَغِ بَيْنَ ذَلِكَ سَبِيلاً } .