Well, no one really "invented" electricity, but you can ask who discovered it.
600 B.C. Thales of Miletus writes about amber becoming charged by rubbing - he was describing what we now call static electricity.
1600 A.C. English scientist, William Gilbert first coined the term "electricity" from the Greek word for amber. Gilbert wrote about the electrification of many substances in his "De magnete, magneticisique corporibus". He also first used the terms electric force, magnetic pole, and electric attraction.
1660 A.C. Otto von Guericke invented a machine that produced static electricity.
1747 A.C. Benjamin Franklin experiments with static charges in the air and theorized about the existence of an electrical fluid that could be composed of particles. William Watson discharged a Leyden jar through a circuit, that began the comprehension of current and circuit. Henry Cavendish started measuring the conductivity of different materials
1752 A.C. Benjamin Franklin invented the lightening rod - he demonstrated lightning was electricity.
1786 A.C. Italian physician, Luigi Galvani demonstrated what we now understand to be the electrical basis of nerve impulses when he made frog muscles twitch by jolting them with a spark from an electrostatic machine.
1821 A.C First electric motor (Faraday).