The invention discloses an oil filter capable of preventing oil leakage during dismounting and mounting. The oil filter capable of preventing oil leakage during dismounting and mounting comprises a shell, a seal groove is formed in the inner top of the shell, a seal ring is arranged in the seal groove, a metal clamping plate is arranged on one side of the seal groove, multiple dirty oil inlets areformed between the seal groove and the metal clamping plate, a clean oil outlet is formed in the middle of the metal clamping plate, a center pipe is arranged in the clean oil outlet, filter paper isarranged on the outer side of the centre pipe, a check valve is arranged on the bottom of the filer paper, a mounting part is arranged on the bottom of the shell, cavities are symmetrically formed inthe mounting part, worm gears are arranged in the cavities, the centers of the worm gears are connected with the cavities through center shafts, one sides of the worm gears are provided with connecting blocks, the ends, away from the worm gears, of the connecting blocks are provided with oil blocking plates, worms are arranged on one sides of the worm gears in an engaged manner, and one ends of the worms are provided with second convex gears in a penetrating manner. The oil filter has the beneficial effects that oil leakage of the oil filter is blocked, and the oil leakage during dismountingof the oil filter can be avoided.