The first known demonstration of electrostatics as a tool of man was by Thales of Miletus (~600 B.C.), who demonstrated that amber could attract lightweight objects after being rubbed with cat fur. It was long thought that this was simply a material property of amber, but in 1600, Gilbert demonstrated that many other materials showed the same behaviour, his work was the effective beginning of electrostatics (The word electron in Greek actually means amber). Magnetostatics may have first been used (in the form of a compass) by Chinese emperor Hoang-Ti in 2637 B.C. in pursuit of an enemy through foggy landscape. It is probably safe to say that magnetostatics preceeded electrostatics in this regard. The first experimental connection between the two was made by Oersted in 1820, who saw deflection of a compass needle when a current carrying wire was brought nearby. Electrodynamics was born shortly after when Ampere wrote down formalism to describe the force he observed between two current carrying wires in the vicinity of one another.
Modern Problems in Classical Electrodynamics C.A. Brau