Animal tissues and organs are comprised of several types of cells, which are often arranged in a well-ordered pattern. The posterior part of the Drosophila wing margin is covered with a double row of long hairs, which are equally and alternately derived from the dorsal and ventral sides of the wing, exhibiting a zigzag pattern in the lateral view. How this geometrically regular pattern is formed has not been fully understood. In this study, we show that this zigzag pattern is created by rearrangement of wing margin cells along the dorsoventral boundary flanked by the double row of hair cells during metamorphosis. This cell rearrangement is induced by selective apoptosis of wing margin cells that are spatially separated from hair cells. As a result of apoptosis, the remaining wing margin cells are rearranged in a well-ordered manner, which shapes corrugated lateral sides of both dorsal and ventral edges to interlock them for zigzag patterning. We further show that the corrugated topology of the wing edges is achieved by cell-type specific expression and localization of four kinds of NEPH1/nephrin family proteins through heterophilic adhesion between wing margin cells and hair cells. Homophilic E-cadherin adhesion is also required for attachment of the corrugated dorsoventral edges. Taken together, our results demonstrate that sequential coordination of apoptosis and epithelial architecture with selective adhesion creates the zigzag hair alignment. This may be a common mechanism for geometrically ordered repetitive packing of several types of cells in similarly patterned developmental fields such as the mammalian organ of Corti.