Because of technique difficulties in achieving the extreme high-pressure and high-temperature (HPHT) simultaneously, direct observation of the structures of carbon at extreme HPHT conditions has not been possible. Banhart and Ajayan discovered remarkably that carbon onions can act as nanoscopic pressure cells to generate high pressures. By heating carbon onions to ∼700°C and under electron beam irradiation, the graphite-to-diamond transformation was observed in situ by transmission electron microscopy (TEM). However, the highest achievable temperature in a TEM heating holder is less than 1000°C. Here we report that, by using carbon nanotubes as heaters and carbon onions as high-pressure cells, temperatures higher than 2000°C and pressures higher than 40 GPa were achieved simultaneously in carbon onions. At such HPHT conditions and facilitated by electron beam irradiation, the diamond formed in the carbon onion cores frequently changed its shape, size, orientation, and internal structure and moved like a fluid, implying that it was in a quasimelting state. The fluctuation between the solid phase of diamond and the fluid/amorphous phase of diamond-like carbon, and the changes of the shape, size, and orientation of the solid diamond, were attributed to the dynamic crystallization of diamond crystal from the quasimolten state and the dynamic graphite− diamond phase transformations. Our discovery offers unprecedented opportunities to studying the nanostructures of carbon at extreme conditions in situ and at an atomic scale.