The invention relates to the technical field of air purification, and discloses a generator capable of generating energy ions, the generator comprises a cylinder body, a ventilation groove and a purification mechanism, a fixing ring is fixedly mounted between the upper part of the cylinder body and the purification mechanism, and the purification mechanism comprises an air outlet cylinder. The generator body is placed in the mounting groove, firstly, the lower end of the generator body makes contact with the supporting plate, then the supporting plate is extruded, the supporting plate moves downwards in the mounting groove, and therefore enough space can be reserved for placing the generator body into the mounting groove, and at the moment, the upper end of the generator body can push the adsorption disc to move upwards; the adsorption disc moves upwards in the mounting groove, at the moment, an adjusting handle is in an open state, then a rotating wheel is adjusted through the adjusting handle, the rotating wheel pulls a pull rod to drive the adsorption disc, a sliding plate can be pulled downwards, a supporting plate at the lower end is extruded, meanwhile, an adsorption bag has adsorption force, and the fixing effect is achieved.