Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) says that a man said: O Messenger of Allah! Will we be held to account for the deeds we did in the Jahiliyyah? He (peace and blessings be upon him) said: "Whoever does well in Islam will not be held to account for his deeds of the Jahiliyyah, and whoever does not do well in Islam will be held to account for both his earlier and his later deeds."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18291