Magnesium (Mg) nanocontacts were elongated and bent by picometer-precise nanotip manipulation under bias voltage application inside a transmission electron microscope, resulting in the diffusion-induced mechanical controllable wiring of single-crystal nanowires (NWs). The length increased to a maximum of 52 nm with 6 nm width. The structural dynamics during the wiring was observed in situ at atomic resolution, and simultaneously, the electric properties of grown NWs were investigated. The crystal growth directions were identified as , , and with formation ratios of 50, 34, and 16%, respectively. Straight NWs were formed by nanocontact elongation, followed by bending, leading to three-dimensional nanometer-scale wiring between two electrodes of different heights.