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, wherein a fixing ring is fixedly mounted between the upper portion of the cylinder body and the purification mechanism, and the purification mechanism comprises an air outlet cylinder. According to the invention, by placing a generator body in a mounting groove, the lower end of the generator body makes contact with a supporting plate, then the supporting plate is extruded, the supporting plate moves downwards in the mounting groove so as to reserve enough space for placing the generator body into the mounting groove, at the moment, the upper end of the generator body can push an 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, and the supporting plate at the lower end is extruded while an adsorption bag has adsorption force, so that the fixing effect is achieved.