The invention relates to an outer hexagonal screwdriver which is based on the magnetorheological effect and has the positioning function and the anti-slippage function. The screwdriver is used for preventing the phenomenon that when a screwdriver is used for tightening or loosening a bolt, a screwdriver blade and a bolt head have relative slippage because exerted force is too large, and the bolt head is damage is prevented. The device is composed of a shell, magnetorheological liquid, an isolating ring, an electromagnetic ring, a piston, a sealing ring, a piston rod, a transverse rod, a connecting rod, a clamping rod, an outer hexagonal screwdriver blade, a volume compensator, a slider, a button and a sliding groove. After the outer hexagonal screwdriver blade extends into the bolt head, the slider is made to slide upwards, the clamping rod is made to tightly clamp the bolt head, then, the button is pressed down and the screwdriver is powered on, no relative slippage happens to the screwdriver blade, the bolt head and the clamping rod when the screwdriver is screwed, finally, it is guaranteed that the bolt is tightened or loosened under the situation that the bolt head is not scratched, next, the button is pressed down again and the screwdriver is powered off, the slider is made to slide downwards so that the clamping rod can loosen the bolt head, and the whole process that the bolt is tightened or loosened is completed.