The invention discloses a mechanism for conveniently switching drilling, expanding, boring and milling functions on a deep hole machine tool. The mechanism comprises a drilling, expanding, boring and milling switching mechanism, tools (including a hole drilling tool, a hole expanding tool, a hole boring tool, a milling tool and a screw tap), special tool rods (including a hole drilling tool rod, a hole expanding tool rod, a hole boring tool rod and a screw tap rod), a front guide box, supporting frames (including a drill stem supporting frame, a hole expanding supporting frame and a hole boring supporting frame), a main shaft box, a main shaft, a main shaft chuck, a movable slide table capable of being precisely positioned, a slide table guide rail, a movable working table capable of being precisely positioned, and a machining cooling system. By means of the mechanism, the use range of the machine tool can be widened, the machining precision of the machine tool can be improved, the deep hole fine machining problem of a deep hole drilling machine can be thoroughly changed, and the deep hole machine tool can have the high-precision hole expanding and hole boring functions, and can truly become a deep hole machine tool with comprehensive machining functions.