Mishkat al-Masabih
Mishkat al-Masabih 87
وَعَن عمرَان بن حضين: إِن رجلَيْنِ من مزينة أَتَيَا رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَقَالَا يَا رَسُولَ اللَّهِ أَرَأَيْتَ مَا يَعْمَلُ النَّاسُ الْيَوْمَ وَيَكْدَحُونَ فِيهِ أَشِيءٌ قُضِيَ عَلَيْهِمْ وَمَضَى فيهم من قدر قد سَبَقَ أَوْ فِيمَا يَسْتَقْبِلُونَ بِهِ مِمَّا أَتَاهُمْ بِهِ نَبِيُّهُمْ وَثَبَتَتِ الْحُجَّةُ عَلَيْهِمْ فَقَالَ لَا بَلْ شَيْءٌ قُضِيَ عَلَيْهِمْ وَمَضَى فِيهِمْ وَتَصْدِيقُ ذَلِكَ فِي كِتَابِ اللَّهِ عَزَّ وَجَلَّ (وَنَفْسٍ وَمَا سواهَا فألهمها فجورها وتقواها) رَوَاهُ مُسلم
ʿImran ibn Husayn reported: Two men from Muzayna came to the Messenger of God and said, “Messenger of God, tell us about what people do and strive for today: is it something already decreed for them and previously determined, or is it something they receive from what their Prophet has brought them, with the proof thereby established against them?” He replied, “No; rather, it is something already decreed for them and previously determined within them.”
Confirmation of this is in the Book of God, mighty and exalted: “By a soul and the One who formed it, then inspired it with its wickedness and its piety.” Muslim transmitted it.