I was walking with the Prophet ﷺ through a cultivated field in Madinah while he was leaning on a palm-leaf stalk. We passed by a group of Jews, and some of them said, "Why don't you ask him?"Others said, "Do not ask him, for he might tell you something you would dislike to hear."But they went ahead and said to him, "Abu Qasim, tell us about the soul."The Prophet ﷺ stood still for a while and raised his head toward the sky. I knew that revelation was descending upon him, and I waited until the revelation was complete. Then he recited, "The soul is from the affair of my Lord, and you have not been given of knowledge except a little" [Isra 17:85].
حدثنا علي بن خشرم أخبرنا عيسى بن يونس عن الأعمش عن إبراهيم عن علقمة
كنت أمشي مع النبي ﷺ في حرث بالمدينة وهو يتوكأ على عسيب فمر بنفر من اليهود فقال بعضهم لو سألتموه فقال بعضهم لا تسألوه فإنه يسمعكم ما تكرهون فقالوا له يا أبا القاسم حدثنا عن الروح فقام النبي ﷺ ساعة ورفع رأسه إلى السماء فعرفت أنه يوحى إليه حتى صعد الوحي ثم قال {الروح من أمر ربي وما أوتيتم من العلم إلا قليلا}
Sourcing, agreed upon [by Bukhari and Muslim]. Muslim also transmitted it in the Characteristics of the Hypocrites, Chapter on the Jews Asking the Prophet ﷺ About the Spirit and His Saying, Most High, "They ask you about the Spirit," Hadith 2794, from Ali bin Khashram, and Bukhari, Hadith 7297, from the hadith of Isa bin Yunus, with this wording.