The invention relates to an ultraviolet disinfection device with an adjusting function used for sewage treatment. The device comprises a sewage pool, a water inlet pipe, a water discharge pipe, a controller, a top plate, a moving mechanism, a plurality of disinfecting mechanisms and two supporting rods; the moving mechanism comprises a first motor, a rotating disc, a drive component and a plurality of moving components; each moving component comprises one driven bevel gear, one lead screw, one moving block and two supporting units; and each disinfecting mechanism comprises one second motor, one disc, one rotating shaft, one bottom disc, one power component and a plurality of ultraviolet lamps. The ultraviolet disinfection device with the regulating function used for the sewage treatment provided by the invention can adjust an inclination degree of each ultraviolet lamp tube through one corresponding disinfection mechanism to make the ultraviolet lamp tubes immersed into sewage to prevent ultraviolet light from irradiating to the outside to affect people health, and the moving mechanism can drive the disinfection mechanisms to rotate to adjust the axial distance between the disinfection mechanism and the rotating disc, so that the ultraviolet radiation range is expanded, full sterilization disinfection of the sewage is realized, and the practicability of the equipment is improved.