A correction method for automatic, high-precision CD-measurements on electrostatically charged wafers has been developed and installed in the Hitachi CD-SEM S-9260 to evaluate its performance. There are two types of charging: global and local. Global charging is stable and spreads all over a wafer while the local charging area is limited within the beam scanning area. A conventional CD-SEM has two weak points with respect to those charged wafers: one is failure at the positioning and autofocusing procedure which interferes with the fully automatic measurement sequence, and the other is disturbance of optical magnification which degrades the precision of CD-measurement values. By probing the global charging voltage with an electrostatic voltmeter prior to the CD-measurements, we subtract the voltage from a retarding voltage and then apply it to the wafer holder. The beam-focusing condition can stay within the fully automatically tunable range. And by generating numerical functions to represent the relationship between the global charging voltage, wafer height, excitation current of the objective lens and optical magnification, with the help of electron optical simulations, we can calculate the true optical magnification and the correct CD-measurement values. The local charging voltage is derived from the voltage shift of S-curves of secondary electron yield between conductive and insulated wafers measured with an energy filter. We correct the CD-measurement values using the simulated proportional relationship between magnifications of the electrostatic micro-lens and the local charging voltage. The coefficient is almost constant when the charging area is smaller than an equivalent circle of 100µm radius. We demonstrate that the CD-measurement values are successfully corrected within 0.1% in deviation for both charging types.