An electric bed has a first bed board and a second bed board, which are hinged with each other, and a bed frame, a head bracket, a head driving motor, and a head pull rod. The bed frame has an upper bed frame and a lower bed frame. The second bed board and the upper bed frame are fixedly connected in a dismountable mode. The upper bed frame and the lower bed frame are connected by a guide rail connecting structure so that the upper bed frame can move relative to the lower bed frame. One end of the head bracket is hinged with the bed frame and another end of the head bracket is supported against the first bed board.