The confinement of liquids in nanometer-scale gaps can lead to changes in their viscous shear properties. For liquids of polar molecules, the charge state of the confining surfaces has a significant influence on the structure in the confined liquid. Here we report on the implementation of dynamic shear force microscopy in an electrochemical cell. Lateral oscillations of the tip of an atomic force microscope were magnetically activated at a frequency of about 50 kHz. The damping of the lateral tip oscillation was recorded as a function of the tip-sample distance and of the electrode potential at the surface of a Au(100) single crystal electrode. The influence of surface charges on the shear response of the nano-confined liquids was demonstrated for the ionic liquid [EMIM][NTf2] and for aqueous Na2SO4 solution.