The atomistic mechanism for direct conversion of graphite to diamond is a long-standing problem in condensed matter physics. Here, we establish by ab initio calculations bond reconstruction pathways from graphite to a basic series of diamond polytypes of 2H, 3C, 4H, and 12R. The conversion proceeds through two newly identified compressed-graphite phases of orthorhombic and monoclinic carbon with odd-membered (5 + 7) rings toward the diamond structures via a local-bond-rotation mechanism. The rhombohedral 12R phase represents a new crystal form of diamond with an alternating four-layered hexagonal (h) and cubic (c) close-packed structure in (hcch)3 stacking. These results resolve the fundamental questions about the graphite-to-diamond phase transformation at high pressure and high temperature.