The invention discloses a split encoder integrated with a grating and a motor shaft. The split encoder comprises a circuit board, a main body, a movable grating base and a motor, wherein the motor comprises a first mounting surface, a second mounting surface and the motor shaft, the first mounting surface and the second mounting surface are staggered to form a first circumferential surface, the motor shaft comprises a shaft end surface, a threaded hole in the axis and a limiting surface, the main body comprises a first fitting surface, a second fitting surface and a central through hole, the first fitting surface and the second fitting surface are staggered to form a second circumferential surface, a movable grating is mounted on the movable grating base, and the movable grating base is matched with the motor after passing through the central through hole of the main body. By adopting the bearingless mounting structure, the movable grating base is directly mounted on the motor shaft, and the motor shaft directly drives the movable grating base to rotate, thereby saving two bearings of the conventional encoder. The main body of the encoder is directly mounted onto the mounting planeof the motor, thereby saving a blade spring used for connecting the encoder main body and the motor for the traditional encoder.