Dehydrative cyclization of diols to O-heterocycles is attractive, but acid and/or metal-based catalysts are generally required. Here, we present a hydrogen-bond donor and acceptor cooperative catalysis strategy for the synthesis of O-heterocycles from diols in ionic liquids [ILs; e.g., 1-hydroxyethyl-3-methyl imidazolium trifluoromethanesulfonate ([HO-EtMIm][OTf])] under metal-free, acid-free, and mild conditions. [HO-EtMIm][OTf] is tolerant to a wide diol scope, shows performance even better than H2SO4, and affords a series of O-heterocycles including tetrahydrofurans, tetrahydropyrans, morpholines, dioxanes, and thioxane in high yields. Mechanism investigation indicates that the IL cation and anion serve as hydrogen-bond donor and acceptor, respectively, to activate the C─O and O─H bonds of alcohol via hydrogen bonds, which synergistically catalyze dehydrative cyclization of diols to O-heterocycles. Notably, the products could be spontaneously separated after reaction because of their immiscibility with the IL, and the IL could be recycled. This green strategy has great potential for application in industry.