Electricity is not invented; it is a force of nature that has been in existence since, well... the start of the universe. The ancient Greeks have been known to produce static electricity by rubbing amber. By 600 B.C., Thales of Miletus began studying the concept of static electricity and how it affected objects by making them attract or repel each other.
There does persist a myth that Benjamin Franklin discovered electricity, which is incorrect. He simply proved that lightning is a form of electricity.