Imidazolium-based ionic liquids are firstly utilized as the solvent, structure-directing agent, charge compensating agent, as well as reaction sources to give two novel crystalline 3D open-framework halogeno(cyano)cuprates showing strong luminescence.