The invention relates to a numerical control drilling and tapping all-in-one machine and a control method thereof. The numerical control drilling and tapping all-in-one machine is characterized by comprising a frame, a left Y-direction slide rail structure, a right Y-direction slide rail structure, a workpiece clamping table, a portal type mounting rack, a left slide block structure, a right slide block structure, a Y-direction driving structure, a slide framework, an X-direction driving structure, a left slider, a right slide, a Z-direction driving structure, a drill bit motor assembly, a screw tap motor assembly, a drill bit and a screw tap. The numerical control drilling and tapping all-in-one machine has the advantages as follows: multiple functions are achieved; cutting, edging and tapping can be fulfilled on one machine; the degree of automation and the machining precision are high; complex linear interpolation, circular interpolation, feed speed regulation, rough machining, finish machining and the like can be carried out; the control and regulation are easy; the operating efficiency is high; and the manipulation is more convenient.