We have developed a method for local potential measurements in liquid using frequency modulation atomic force microscopy. In this method, local potential is calculated from the first and second harmonic vibrations of a cantilever induced by applying an ac bias voltage between a tip and a sample. The use of an ac bias voltage with a relatively high frequency prevents uncontrolled electrochemical reactions and redistribution of ions and water. The nanoscale resolution of the method is demonstrated by imaging potential distribution of a dodecylamine thin film deposited on a graphite surface in 1 mM NaCl solution.