The invention provides an automatic programming method for processing the finish machining allowance of a die. The method comprises the following steps of: 1, saving a processing program in a TXT format in the G code form; 2, reading data of the processing program TXT document; 3, extracting a row of data from the processing program document in sequence, and classifying and integrating the information; 4, judging whether the data extracted in the step 3 needs to be corrected, if YES, skipping to the step 5, and otherwise, skipping to the step 7; 5, obtaining the size and vector direction of the machining allowance; 6, correcting the machining G codes according to the size and the vector direction of the machining allowance, and outputting a new G code; 7, directly outputting the remainingprocessing G codes to a text window, extracting the next row of data from the processing program TXT document, if the next row is the last row, ending a G code modification part in the automatic programming, and otherwise, skipping to the step 3. According to the invention, the numerical control programming efficiency can be improved, and the error rate is reduced.