It is narrated from Sayyiduna Marthad (may Allah be pleased with him) - who was one of the Companions of the Prophet (peace and blessings be upon him) - he said: "Allah drew two lines in His Book, then He raised the pen; in one of them He wrote the creation, and in the other He wrote what the creation will do."
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 17909