The invention provides a machine tool for automatically milling two end faces and drilling central holes of a pin shaft. According to the machine tool, central hole drilling and one-outer-circle sleeving and turning are combined into one working procedure, automatic feeding and automatic discharging are carried out, and the production efficiency is greatly improved. The machine tool is mainly composed of a tool frame assembly, an automatic positioning device, an automatic clamping device, an automatic feeding device, an automatic double-face milling device, an automatic central hole drilling and sleeving-turning device and an automatic discharging device. The machine tool is reasonable and practical in design, two-end-face milling, central hole drilling and one-outer-circle sleeving and turning are combined into one working procedure, automatic feeding and automatic discharging are achieved, the speed is high, labor and time are saved, the concentricity of the central holes of the two ends is high, the grinding allowance is small, the production efficiency and the economic benefits of an enterprise are improved, the quality of a machined product is excellent, and the machine tool particularly meets the large-scale production requirement.