As a new, high-strength and clean cast iron material, nitrogen-containing gray cast iron has excellent properties and a wide range of application prospects. However, the excellent material properties of the material not only make the machinability challenging, but also the high efficiency and quality of the machining process is a pressing issue. Therefore, it is necessary to study the machining characteristics of nitrogen-containing gray cast iron to obtain the optimal machining parameters to enrich the research work on nitrogen-containing gray cast iron. In this paper, the machining characteristics of nitrogen-containing gray cast iron are systematically studied, and the effects of cutting parameters on milling force, milling temperature, and surface roughness are analyzed. And, based on the machinability assessment, the objective function weights under different production requirements are determined by using hierarchical analysis trade-offs, and an integrated optimization model based on non-dominated ranking genetic algorithm and hierarchical analysis (AHP) is proposed. The model outputs the optimal combination of milling parameters by inputting the cutting speed (vc), feed rate per tooth (fz) and cutting depth (ap), surface roughness and cutting efficiency as the objective functions. The experimental results show that cutting depth has the greatest effect on the cutting force and cutting speed has the greatest effect on the cutting temperature and the surface roughness. The passivation effect of nitrogen on the graphite tip resulted in an increase in both cutting force and cutting temperature. The parameter optimization results indicated that the optimized roughing parameters significantly improve the surface quality while machining efficiently; the optimized finishing parameters improve Ra by 23.53% while ensuring higher MRR, which can achieve efficient and high-quality machining under different production requirements and provide an experimental basis for practical engineering applications of nitrogen-containing gray cast iron.