Nanowire (NW) transfer technology has provided promising strategies to realize future flexible materials and electronics. Using this technology, geometrically controlled, high-quality NW arrays can now be obtained easily on various flexible substrates with high throughput. However, it is still challenging to extend this technology to a wide range of high-performance device applications because its limited temperature tolerance precludes the use of high-temperature annealing, which is essential for NW crystallization and functionalization. A pulsed laser technique has been developed to anneal NWs in the presence of a flexible substrate; however, the induced temperature is not high enough to improve the properties of materials such as ceramics and semiconductors. Here, we present a versatile nanotransfer method that is applicable to NWs that require high temperature annealing. To successfully anneal NWs during their transfer, the developed fabrication method involves sequential removal of a nanoscale sacrificial layer. Using this method, we first produce an ultralong, perfectly aligned polycrystalline barium titanate (BaTiO3) NW array that is heat treated at 700 degrees C on a flexible polyethylene terephthalate (PET) substrate. This high-quality piezoelectric NW array on a flexible substrate is used as a flexible nanogenerator that generates current and voltage 37 and 10 times higher, respectively, than those of a nanogenerator made of noncrystallized BaTiO3 NWs.