In the year 1821 British scientist Michael Faraday explained the conversion of electrical energy into mechanical energy by placing a current carrying conductor in a magnetic field which resulted in the rotation of the conductor due to torque produced by the mutual action of electrical current and field.
Based on his principal the most primitive of machines a D.C.(direct current) machine was designed by another British scientist William Sturgeon in the year 1832. But his model was overly expensive and wasn’t used for any practical purpose. Later in the year 1886 the first electrical motor was invented by scientist Frank Julian Sprague. That was capable of rotating at a constant speed under a varied range of load, and thus derived motoring action.