| MadSci Network: Science History |
It is hard to narrow this down to one person, as many people did work in this area simultaneously. Oersted published the first paper detailing the effects which led to further work in electromagnetism. Ampere followed this with a mathematical formula. Faraday did a great deal of work on the subject. Probably Joseph Henry invented what we think of as an electromagnet today.
Try the links in the MadSci Library for more information on Science History.