A microelectrochemical cell housed in an optical microscope and custom-made accessories have been designed and fabricated, which allows performing spatially resolved corrosion measurements. The cell assembly was designed to directly integrate the reference electrode close to the capillary tip to avoid air bubbles. A hard disk along with an old optical microscope was re-engineered into a microgrinder, which made the vertical grinding of glass capillary tips very easy. A stepper motor was customized into a microsyringe pump to dispense a controlled volume of electrolyte through the capillary. A force sensitive resistor was used to achieve constant wetting area. The functionality of the developed instrument is demonstrated by studying μ-electrochemical behavior of worn surface on AA2014-T6 alloy. © 2015 AIP Publishing LLC.