We have developed a novel strategy for localized electrochemical deposition (LECD) to improve both the lateral resolution of the process and the porosity of the fabricated high-aspect-ratio microstructures. The strategy is based on accurately controlling the motion of the anode. Its implementation is made possible by the use of coherent, synchrotron X-ray microradiography with high time and lateral resolution, enabling the observation of the copper LECD process in real time. Microradiography reveals a deposition mechanism that differs as a function of the distance between the electrode (anode) and the growing structure (cathode). Specifically, the interplay of migration and diffusion of the metal ions in the baths affects the deposition rate and the characteristics of the fabricated structure. This enables us to optimize the anode motion control and greatly improve the quality of the structure grown.