We report herein ab initio molecular dynamics simulations of graphite under shock compression in conjunction with the multiscale shock technique. Our simulations reveal that a novel short-lived layered diamond intermediate is formed within a few hundred of femtoseconds upon shock loading at a shock velocity of 12 kms (longitudinal stress>130 GPa), followed by formation of cubic diamond. The layered diamond state differs from the experimentally observed hexagonal diamond intermediate found at lower pressures and previous hydrostatic calculations in that a rapid buckling of the graphitic planes produces a mixture of hexagonal and cubic diamond (layered diamond). Direct calculation of the x-ray absorption spectra in our simulations reveals that the electronic structure of the final state closely resembles that of compressed cubic diamond.