Diamond is a major carbon allotrope, whereas C8 is a rare and mysterious carbon allotrope with a super-cubic crystal structure that is even denser than diamond (by 15%). Little is known about the properties of C8 nanocrystals (NCs) because carbon NCs synthesized under usual conditions have either a graphitic or diamond crystal structure. We develop a hydrothermal method to synthesize well-crystallized C8 ([similar]6.1 nm) and diamond ([similar]4.7 nm) NCs. The crystal phase of the synthesized carbon NCs is determined by the pH of the initial precursor solution: acid solution results in diamond NCs while basic solution results in C8 NCs. These two phases of carbon NCs can be reversibly converted to each other by changing the pH from acidic to basic or vice versa under thermal conditions.