The invention relates to an automatic electric generator which supplies power to electric appliances by using strings to provide power to push a magnet to work. The electric generator is formed by combining a motor, a sensor, a power accumulator, a rectifier, a winding, a power transmission device, a lead, a switch, a driving wheel, and a power device, a transmission device, a reinforcement device, a reduction gear, a generator, and an upper chord device which are matched with the generator. The invention which can replace the prior coal-fuelled generator, fuel generator, wind power generator, water power generator and the like has the advantages that the generator is free from pollution and noises, requires no energy, can continuously work for a long time, is convenient to carry and widein application, and saves time, labor, and money.