When and where life originated on Earth – and if, or where, life exists elsewhere in the cosmos – are some of the biggest scientific questions of our time. Even the origin of the basic materials needed for life is a mystery. Meteorites and comets are often cited as potential sources of simple organic molecules. When these impact Earth, they experience extreme conditions – pressures a million times higher than the atmospheric pressure at Earth’s surface and temperatures as hot as the surface of the sun. Under these conditions, the simple molecules can reform into more complex and novel structures, including nucleotide bases for RNA and DNA. We can study how these organic fragments form and how they can build up complex products using SLAC’s X-ray free-electron laser. With observations that take place in a tiny fraction of a second, we can shock-compress materials to create extreme conditions and visualize the breaking and forming of chemical bonds. In this presentation, I will show how this technique may hold the key to revealing the origin of life via complex chemical dynamics taking place on ultrafast time scales and at ultrahigh pressures and temperatures.