Abdullah bin Masud reported,

I was with the Prophet ﷺ in a cultivated field in Madinah, and he was leaning on a palm branch. He passed by a group of Jews, and some of them said, "Ask him about the spirit."Others said, "Do not ask him, or he will make you hear something you will not like."But they went up to him and said, "Abu Qasim, tell us about the spirit."He stood for a while, gazing upward, and I realized that revelation was coming to him, so I drew back from him until the revelation had lifted. Then he recited, "And they ask you about the spirit. Say, the spirit is from the command of my Lord" [Isra 17:85].

Bukhari 7297

Sahih

حدثنا محمد بن عبيد بن ميمون حدثنا عيسى بن يونس عن الأعمش عن إبراهيم عن علقمة

عن ابن مسعود رضي الله عنه قال

كنت مع النبي ﷺ في حرث بالمدينة وهو يتوكأ على عسيب فمر بنفر من اليهود فقال بعضهم سلوه عن الروح وقال بعضهم لا تسألوه لا يسمعكم ما تكرهون فقاموا إليه فقالوا يا أبا القاسم حدثنا عن الروح فقام ساعة ينظر فعرفت أنه يوحى إليه فتأخرت عنه حتى صعد الوحي ثم قال {ويسألونك عن الروح قل الروح من أمر ربي}

البخاري 7297صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Adhering to the Book and the Sunnah
Chapter
What is disliked of excessive questioning and burdening oneself with what does not concern him
Numbering
Darussalam 7297
Bukhari 7297