Carbon materials display intriguing physical properties, including superconductivity and highly anisotropic thermal conductivity found in graphene. Compressive strain can induce structural and bonding transitions in carbon materials and create new carbon phases, but their interplay with thermal conductivity remains largely unexplored. We investigated the in situ high-pressure thermal conductivity of compressed graphitic phases using picosecond transient thermoreflectance and first-principles calculations. Our results show an anomalous thermal conductivity that peaks to 260 W/mK at 15-20 GPa but drops to 3.0 W/mK at ∼35 GPa. Together with complimentary in situ Raman and x-ray diffraction results, the abnormal thermal conductivity trend of compressed carbon is attributed to phonon-mediated conductivity influenced by interlayer buckling and sp^{2} to sp^{3} transition and, subsequently, the formation of M-carbon nanocrystals and amorphous carbon. Strain-induced structural and bonding variations provide a wide-range manipulation of thermal and mechanical properties in carbon materials.