We have developed synchrotron x-ray-diffraction techniques for studying the structure of liquids at high pressures and high temperatures and have applied them to measuring structural transformation of liquid Te up to 22 Gpa. The nearest-neighbor distance of liquid Te, which is 2.9-3.0 Å and already larger than 2.8 Å of crystalline Te at 0 GPa, further increases with pressure to 3.1 Å at 6 GPa in spite of the volume contraction, and then decreases gradually at higher pressures. The anomalous expansion of the nearest-neighbor distance can be attributed to the increase in coordination number from 2-3 at 0 GPa to 4 at 6 GPa and the resultant weakening of the covalent bond. The coordination number further increases with pressure and approaches to 14, i.e., the number for a closely packed simple-liquid structure, at 22 GPa. However, the effect of the increase in coordination number on the nearest-neighbor distance is much smaller in a dense metallic state at high pressures than in a sparse covalent state at low pressures.