A reciprocating ejector mechanism for an electric bed comprising an aperture formed on a bed board. An ejector mechanism is mounted in the aperture. The ejector mechanism includes an ejected part, which is arranged parallel to the bed board. At least one first connecting rod with one end is connected with the ejected part and another end is hinged with a slider. The slider may slide along the guide bar fixed on the bed board. A second connecting rod with one end can be hinged with the middle part of the first connecting rod and another end hinged with the bed board. The ejector mechanism may have a driving device fixed on the bed board and connected with the linkage to drive the first connecting rod to rotate, so that the ejected part is driven to move parallel to the bed board.