It is narrated from Abu al-Aswad al-Du'ali (may Allah have mercy on him) that he asked Sayyiduna Imran bin Husayn (may Allah be pleased with him), Sayyiduna Abdullah bin Mas'ud and Sayyiduna Ubayy bin Ka'b (may Allah be pleased with them) about divine decree (qadar), and said: I have kept disputing with the people of qadar (those who deny the decree) until they put me in difficulty; so do you have any knowledge about it that you can tell me? They said: "If Allah, the Mighty and Majestic, were to punish the inhabitants of the heavens and the earth, He would punish them without being unjust to them; and if He were to admit them into His mercy, His mercy would be greater than their sins. But, as He has decreed, He punishes whom He wills and has mercy on whom He wills; so whoever is punished, that is the truth, and whoever is shown mercy, that too is the truth. And if you had the like of (the mountain of) Uhud (in gold) and spent it in the way of Allah, it would not be accepted from you until you believe in the decree in its entirety, its good and its evil." Then, when Sayyiduna Imran (may Allah be pleased with him) had narrated this hadith to Abu al-Aswad, he said: "I heard this from the Messenger of Allah (peace and blessings be upon him), and Abdullah and Ubayy bin Ka'b (may Allah be pleased with them both) heard it with me." So Abu al-Aswad asked the two of them, and they too narrated the same hadith from the Messenger of Allah (peace and blessings be upon him).
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 15647
It is narrated from Sayyiduna Imran bin Husayn (may Allah be pleased with him) that a man came to the Messenger of Allah (peace and blessings be upon him) and said: What do you think of what people do today and strive in: is it something that has been decreed for them, or that has passed upon them from a decree that came before, or is it among the things they undertake anew, on the basis of the guidance their Prophet brought them, and you have established the proof against them? He (peace and blessings be upon him) said: "Rather, it is something that has been decreed for them and has passed upon them." He said: Then why do they act? The Messenger of Allah (peace and blessings be upon him) said: "Whomever Allah has created for one of the two abodes, He enables him to do its deeds." - he said - "The confirmation of that is in the Book of Allah: 'And by the soul and the One who proportioned it, then inspired it with its wickedness and its righteousness' [Al-Shams: 8]."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 15648