Stable and durable piezoelectric nanogenerators (PENGs) with good flexibility, high performance and superior radiation resistance under harsh environments are promising for space exploration. Here, a novel PENG based on P(VDF-TrFE)/boron nitride nanotubes (BNNTs) nanocomposite micropillar arrays with enhanced performance and excellent neutron radiation shielding is prepared by a reliable nanoimprint lithography. The PENG comprised of a microstructured P(VDF-TrFE)/0.3 wt% BNNTs nanocomposite demonstrates an outstanding output voltage of 22 V and a sensitivity of 55 V/MPa under the pressure of 0.4 MPa, which are 11-fold higher than those of pristine P(VDF-TrFE) film. This dramatic enhancement in performance is ascribed to synergistic contributions from strong piezoelectric BNNTs and a strain confinement effect of the nanocomposite microstructure. In practice, the PENG is capable of scavenging various mechanical and biomechanical energy for lighting up commercial LEDs, an LCD screen and a digital watch. More importantly, the as-obtained PENG exhibited 9% neutron radiation shielding with neutron cross section increase reaching 260% when compared to the film without BNNTs. Moreover, the high output is retained after 2 h of neutron radiation exposure. Overall, the as-prepared microstructured nanocomposites look promising for high-efficiency piezoelectric nanogenerators for the self-powered and wearable electronic devices, in particularly, under the extreme space environments.