We present the first direct experimental test of the complex ion structure in liquid carbon at pressures around 100 GPa, using spectrally resolved x-ray scattering from shock-compressed graphite samples. Our results confirm the structure predicted by ab initio quantum simulations and demonstrate the importance of chemical bonds at extreme conditions similar to those found in the interiors of giant planets. The evidence presented here thus provides a firmer ground for modeling the evolution and current structure of carbon-bearing icy giants like Neptune, Uranus, and a number of extrasolar planets.