Astrobiology must be seen in the context of cosmic evolution, the 13.7 billion-year master narrative of the universe. The idea of an evolving universe dates back only to the 19th century, and became a guiding principle for astronomical research only in the second half of the 20th century. The modern synthesis in evolutionary biology hastened the acceptance of the idea in its cosmic setting, as did the confirmation of the Big Bang theory for the origin of the universe. NASA programmes such as Origins incorporated it as a guiding principle. Cosmic evolution encompasses physical, biological and cultural evolution, and may result in a physical, biological or postbiological universe, each with its own implications for long-term human destiny, and each imbuing the meaning of life with different values. It has the status of an increasingly accepted worldview that is beginning to have a profound effect not only in science but also in religion and philosophy.