We have studied the structure of liquid metals at high temperatures and high pressures, i.e., fluid mercury near the critical point and dense liquid/solid sodium at high pressures, by molecular dynamics (MD) simulations. For fl uid mercury near the critical point, using classical MD with Lennard-Jones-type effective pair potential, we have investigated the dependence of the structure on the system size and cut-off distance of the effective pair potential, and found that the static structure depends strongly on the system size and cut-off distance, when the system is close to the critical point. For dense liquid/solid sodium at high pressures, by performing ab initio MD with 3s- and 2p3s-valence-electron models, we have found that the melting curve has a melting point maximum, which depends on the type of valence-electron models used at high pressures. We can say that the effect that can be neglected at ambient conditions, i.e., the effects of long-range interaction of Hg and inner core 2p states of Na, play important roles when the systems approach to the special conditions.