The present invention discloses a method of electromagnetic drive rectilinear motion and the device thereof, comprising a electric driver, two electromagnets in the shape of U (two feet are in parallel and form an angle at one end), a straight metal conductor provided with a location sensor which form a shape of letter 'n' with the electromagnets. Inputting two continuous periodic sawtooth wave pulse current to the device, generating periodically enhanced or weakened magnetic field on two magnetic poles of the electromagnets, generating periodic magnetic flux enhancement or weakening on touch part between conductor and magnetic poles, generating eddy current on partial conductor and the energy conversion used for conductor displacement, hence electromagnetic linear drive and power - magnetic energy - mechanical energy conversion are realized. As prime mover of rectilinear motion and or straight reciprocating motion, the device in the invention can replace existing bent axle or complex mechanism like eccentric wheel, engine oil cylinder etc., and can be applied on engine of motorcycle and electric vehicle, new electric submersible direct-drive reciprocating pump (oil well), compressor of refrigerator and air condition, high pressure pump, intercity maglev light rail, maglev train and ship injection propulsion pump etc. as a new engine device.