The interest of using polyimide as a sacrificial and anchoring layer is demonstrated for post-processing surface micromachining and for the incorporation of metallic nanowires into microsystems. In addition to properties like a high planarization factor, a good resistance to most non-oxidizing acids and bases, and CMOS compatibility, polyimide can also be used as a mold for nanostructures after ion track-etching. Moreover, specific polyimide grades, such as PI-2611 from HD Microsystems TM , involve a thermal expansion coefficient similar to silicon and low internal stress. The process developed in this study permits higher gaps compared to the state-of-the-art, limits stiction problems with the substrate and is adapted to various top-layer materials. Most metals, semiconductors or ceramics will not be affected by the oxygen plasma required for polyimide etching. Released structures with vertical gaps from one to several tens of μm have been obtained, possibly using multiple layers of polyimide. Furthermore, patterned freestanding nanowires have been synthesized with diameters from 20 to 60 nm and up to 3 μm in length. These results have been applied to the fabrication of two specific devices: a generic nanomechanical testing lab-on-chip platform and a miniaturized ionization sensor.(Some figures may appear in colour only in the online journal) Polyimide (PI) is often selected for its high planarization factor, CMOS compatibility, tolerance to most chemical products used in microfabrication, and chemical resistance up to high temperatures. Moreover, depending on its formulation, PI can be spin-coated with thicknesses as high as several tens of μm and as low as 200 nm by diluting the precursor solution in its solvant [8]. A large range of possible gaps is thus allowed between a top movable clamped-clamped membrane or beam and a fixed bottom electrode lying on the substrate. New formulations of PI show additional interesting properties such as a thermal expansion coefficient similar to silicon (Si),