The invention discloses an assembling device with a sealing function. The assembling device comprises a first separating body, a second separating body and a gasket, wherein the first separating body is provided with a first surface, the second separating body is provided with a second surface, the gasket is provided with a convex rib, the convex rib is in contact with the first surface and the second surface, at least one side of the convex rib is provided with a branch groove in a protruding way, at least one end of an elastic body which is fixedly arranged on the convex rib is embedded in the branch groove, and the elastic body is simultaneously in contact with the first separating body and the second separating body. Compared with the design of a traditional gasket, due to the additional arrangement of a glue groove and the elastic body, the sealing problem in a height difference can be completely solved, complete sealing can be achieved, and the sealing reliability can be increased; the gasket has a better adaptability on the height difference, the processing accuracy of a flange surface can be reduced, thus the processing efficiency is increased, and the cost is saved.