In liquids, the viscosity is caused by cohesive force between molecules of liquid. Due to this cohesive force, any layer in a moving liquid tries to drag the adjacent layer and this produces the effect of viscosity
An increase in temperature decreases cohesion between molecules of liquid and thus viscosity of liquid decreases.