The present invention disclose a pumping unit driven by a linear motor, comprising a guide rail support in the form of a frame structure, a mover of the linear motor provided with slide blocks, said slide blocks engages guide slide ways used for said mover and mounted on inner sides of said guide rail support, six stators of the linear motor, said stators are mounted on inner sides of said guide rail support, a chain wheel disposed at the top of said guide rail support, a chain, said chain is connected to an upper end of said mover of the linear motor at one end, passes said chain wheel and is then connected to a pumping slick rod of a wellhead device at the other end thereof, a counterweight, and a counterweight chain, said counterweight chain is connected to a lower end of said mover at one end, passes a bottom chain wheel disposed at the bottom of the guide rail support and a top chain wheel disposed at the top of the guide rail support sequentially and is then connected to said counterweight at the other end thereof. Since the pumping unit is disposed at a side of the wellhead, it is convenient for operations and eliminates possibility of occurring of accident without changing the original wellhead.