Thomas Davenport was a blacksmith in Brandon Vermont. He was fascinated by the newest scientific device at the time, the electromagnet. These were horseshoe shaped pieces of iron, wound with insulated wire, and charged by a battery. A small one could lift a horseshoe, and a large one could lift an anvil. This was the first time that it was shown that magnetism and electricy were related, and electricity could produce magnetism.
Davenport purchased an electromagnet, and at home carefully unwound and dismantled the device. His wife Emily took notes as to its construction as Davenport took it apart. Then using wire insulated with the silk of his wife's wedding dress, he built his own electromagnets. It was then that he went beyond the existing technology of electromagnets. He attached one of his electromagnets to a wheel, and fixed another to a stationary frame. The attraction of these magnets caused the wheel to rotate one half revolution. He learned that he could reverse the wiring to one magnet, and get the wheel to complete another half revolution, for one complete revolution.
Then he designed a segmented conductor that supplied current to the wheel mounted electromagnet, and the sections reversed the current at the right time to cause the polarity to reverse automatically, and caused the wheel not only to complete one revolution, but also to rotate continuously. He had invented the electric motor.
He applied for a patent, but his application was rejected because turning a wheel by electricity was totally unknown and unbelievable. He submitted a working model, but it was destroyed in a fire. He submitted a second working model, with review and analyis by scientists of the day, and his patent was approved in 1837.
The technology that was required to fully realize the potential of the electric motor was that a spinning motor could also generate electricity. That piece of the puzzle was supplied by the invention of the dynamo.