Michael Faraday invented the first electric generator in 1831. This British chemist and physicist did extensive work in the field of electricity that paved the way for the inventions of the electric motor and transformer.
Earlier in the same year that he made his first generator, Faraday discovered electromagnetic induction. He found that the electromagnetic effect a current has in one wire is able to generate electricity in another wire. Using this information, he learned how to produce a steady current. He connected two wires to a copper disc. He then maintained a steady current when he switched the disc back and forth between the two poles of a horseshoe magnet. Thus he made his first electric generator.