A hospital bed includes a frame, a head board, a foot board and an apparatus for lifting and lowering the head board and the foot board. The apparatus includes a first motor unit, a shaft unit, a gear box and a second motor unit. The first motor unit is provided beneath the frame. The shaft unit is connected to both of the head board and the foot board. The gear box is provided on a side of the first motor unit and connected to the shaft unit for lifting and lowering the head board and the foot board. The second motor unit includes a motor and a pair of wires. The motor is provided with a mandrel. The mandrel is engaged with the gear box. The second motor unit is electrically connected to the first motor unit through the pair of wires for automatically lifting and lowering the head board and the foot board.