In the 1820s, Michael Faraday produced a current by pushing a magnet in and out of a coil of a wire. Unfortunately, he had trouble convincing people that his discovery was useful. Eventually, the generator was developed based on faraday's discovery.
Michael Farady was the one who discovered electrostatic induction and later on invented the first electric motor. He made the model for the first generator in 1831 which was then worked on by others to develop the modern generator as we know today.