Nanometer-level patterned surface structures form the basis of biological functions, including superhydrophobicity, structural coloration, and light absorption 1-3. In insects, the cuticle overlying the olfactory sensilla has multiple small (50- to 200-nm diameter) pores 4-8, which are supposed to function as a filter that admits odorant molecules, while preventing the entry of larger airborne particles and limiting water loss. However, the cellular processes underlying the patterning of extracellular matrices into functional nano-structures remain unknown. Here, we show that cuticular nanopores in Drosophila olfactory sensilla originate from a curved ultrathin film that is formed in the outermost envelope layer of the cuticle and secreted from specialized protrusions in the plasma membrane of the hair forming (trichogen) cell. The envelope curvature coincides with plasma membrane undulations associated with endocytic structures. The gore-tex/Osiris23 gene encodes an endosomal protein that is essential for envelope curvature, nanopore formation, and odor receptivity and is expressed specifically in developing olfactory trichogen cells. The 24-member Osiris gene family is expressed in cuticle-secreting cells and is found only in insect genomes. These results reveal an essential requirement for nanopores for odor reception and identify Osiris genes as a platform for investigating the evolution of surface nano-fabrication in insects.