The invention discloses a positioning device for machining a cam shaft and a cam by a milling machine. The positioning device comprises a fixing table, two fixing columns are welded at the bottom of the fixing table, two positioning device bodies are symmetrically arranged at the top of the fixing table, grooves are formed in the sides, close to each other, of the two positioning device bodies, positioning rods are installed in the grooves in a sliding mode, one ends of the positioning rods extend out of the grooves, and positioning clamping blocks are welded to the ends, close to each other,of the two positioning rods; and first rotating shaft grooves are formed in the ends, located in the grooves, of the positioning rods, first rotating shafts are rotationally installed in the first rotating shaft grooves, one ends of the first rotating shafts extend out of the first rotating shaft grooves, second rotating shaft grooves are formed in the inner walls of the sides, far away from the positioning rods, of the grooves, and the second rotating shaft grooves are rotationally connected with the first rotating shafts. According to the positioning device, the structure is simple, the useis convenient, through the positioning device bodies, the positioning work can be more conveniently carried out, moreover, connecting rods can be easier to fix, the operation is easy, the time is saved, and the use by people can be facilitated to a greater degree.