The invention provides an electric wheelchair having functions of assisting going to and going out of beds and crossing over obstacles. The wheelchair comprises a wheelchair main body, a seat, a seatmoving mechanism, a backrest adjusting mechanism, foldable armrest mechanisms and an obstacle-crossing mechanism. The foldable armrest mechanisms comprise armrests, connecting rods and right-angle rods. The seat moving mechanism comprises the seat, an electric motor, belt wheels, a synchronous belt, a sliding block connecting plate, a crank, connecting rods, a sliding block and a sliding rail. Thebackrest adjusting mechanism comprises an electric motor, belt wheels, a synchronous belt, straight toothed spur gears and a backrest. The obstacle-crossing mechanism comprises two swing rods, smallwheels, an electric motor, a speed reducer and bevel gears. Meanwhile, the backrest adjusting mechanism and the obstacle-crossing mechanism are subjected to time-sharing driving by virtue of the samemotor and an electromagnetic clutch. The electric wheelchair provided by the invention, which has the function of crossing over the obstacles, can cross over obstacles which are 20cm high; the electric wheelchair provided by the invention is convenient for a user to operate and control; patient's motion freedom is improved, patient's motion intensity is reduced and workload of family members is reduced.