Piezotronics is a new field integrating piezoelectric effect into nanoelectronics, which has attracted much attention for the fundamental research and potential applications. In this paper, the piezotronic effect of zinc oxide (ZnO) nanowires, including the response of the electrical transport and photoconducting behaviors on the nanowire bending, has been investigated by in situ transmission electron microscopy (TEM), where the crystal structure of ZnO nanowires were simultaneously imaged. Serials of consecutively recorded current-voltage (I–V) curves along with an increase of nanowire bending show the striking effect of bending on their electrical behavior. With increasing the nanowire bending, the photocurrent of ZnO nanowire under ultraviolet illumination (UV) drops dramatically and the photo response time becomes much shorter. In addition, the dynamic nanomechanics of ZnO nanowires were studied inside TEM. These phenomena could be attributed to the piezoelectric effect of ZnO nanowires, and they suggest the potential applications of ZnO nanowires on piezotronic devices.