Agricultural production in arid and semi-arid area faces a global problem of water resources shortage and land salinization. Irrigation and drainage are the important measure to enhance crop yield and control soil salinity. Generally, at field scale only irrigation is optimized to pursue the higher water use efficiency and crop yield, while drainage is difficult to optimize owing to controlled by dynamic groundwater levels. Here, we develop a new collaborative optimization model of irrigation and drainage to improve irrigation water use efficiency and to control soil salinity. The model is formulated by integrating simulation of physical processes of field water - salt balance and a genetic algorithm-based optimization model. The new model is to search optimized irrigation and drainage strategic decision for enhancing field economic benefit with the condition controlling salinity with limited water resources. Then, a case study on optimally allocating irrigation and drainage water to different growth stages of maize field in the Hetao Irrigation District, arid area of northwest China shows enhanced applicability of the developed model. Five groundwater depth levels (1 m, 1.5 m, 2 m, 2.5 m and 3 m) and five groundwater salinity levels (2 g/L, 2.25 g/L, 2.5 g/L, 2.75 g/L and 3 g/L) are provided to show and compare the solutions of the optimal irrigation and drainage water allocation. Results indicate the developed model can supply reasonable field monthly irrigation and drainage decision with considering field hydrology, especially contribution of groundwater to crop water demand and groundwater role to soil salt accumulation. The contrary relationship between system benefit and irrigation water use efficiency was described successfully by the developed model. And compared with traditional single irrigation optimization model, the developed irrigation-drainage collaborative optimization model can enhance drainage function to keep the optimal groundwater levels and improve the system benefit by 0–8%. Overall, the developed model can provide more applicable irrigation water and drainage strategies to the sustainable development of irrigation agriculture.