We report on the atomic force microscope observation of an electrostatic force between glass surfaces immersed in cyanobiphenil liquid crystals. The measured force is repulsive and decays exponentially with increasing surface separation. A mean field description of the electrostatic interaction in liquids has been used to determine the Debye screening length, the concentration of dissolved ions, and the surface electric potential. The effect of the observed interfacial electric field on the liquid crystal orientation at the surface has been discussed. It has been found that the coupling between the liquid crystal order and the surface electric field does not contribute considerably to the surface orienting action.