Memristor devices that can operate at high speed with high density and nonvolatile capabilities have great potential for the development of high data storage and robust wearable devices. However, in real-time, the performance of memristors is challenged by their instability toward harsh working conditions such as high temperature, extreme humidity, photo irradiation, and mechanical bending. Herein, we introduce a TaOx/AlN-based flexible and transparent memristor device having stable endurance under extreme 2 mm bending (for more than 107 cycles) with an ON/OFF ratio of more than 2 orders of magnitude at 25 ns rapid switching. This device exhibits excellent flexibility under extreme bending conditions (bending radius of 2 mm) even with intense ultraviolet (UV) radiation. A thin AlN insertion layer having low dielectric and high thermal conductivity plays a crucial role in improving the switching stability and device flexibility. In particular, the devices exhibit excellent minimum switching fluctuations under UV irradiation, >106 s nonvolatility retention at high temperature (135 °C), various gas ambient, and damp heat test (humidity 95.5%, 83 °C) because of the indium metal drift during the switching process and high bonding energy of Ta–O. Most importantly, direct observation of indium metal strongly anchored in the TaOx switching layer during the switching process is reported for the first time via transmission electron microscopy, which provides clear insights into the switching phenomenon. Furthermore, the results of electrical and material analyses explain that our facile device design has excellent potential for wearable and aerospace applications.