The invention relates to a joint module and a collaborative robot. The joint module comprises a shell, an input shaft, a driving motor, a brake and a grating absolute encoder, wherein the driving motor is arranged inside the shell, the driving motor comprises a stator and a rotor, the stator is arranged on the shell, and the rotor is arranged on the input shaft and can rotate relative to the stator; the brake is disposed inside the shell, the brake comprises an elastic reset member, a brake magnetic steel sheet, a dynamic friction plate and a static friction plate, the static friction plate isarranged on the shell, the elastic reset member is arranged on the rotor, the brake magnetic steel sheet is connected with the elastic reset member, and the dynamic friction plate is connected with the brake magnetic steel sheet and can be in contact with or separated from the static friction plate; and the grating absolute encoder is disposed inside the brake. The integration and light weight ofthe whole joint module are greatly improved, and the volume and quality of the joint module can be effectively reduced.