When God created humans, he asked all angels to bow down to them and to love humans more than their father. All angels complied except for Lucifer. Due to Lucifer's rebellion, God had Michael cast Lucifer into Hell, where he was imprisoned for thousands of years.
During the events leading up to the apocalypse, forces from both Heaven and Hell worked to secure Michael and Lucifer their true vessels, Sam and Dean Winchester. While both Sam and Dean were initially reluctant, Sam, for unknown reasons said Yes to Lucifer, but Dean continued to refuse. Due to Dean's refusal the angels eventually gave up and left Earth. Dean later regretted his decision and attempted to say yes to Michael, but at that point, it was too late and Lucifer claimed the Earth for himself, driving mankind to near-total extinction.