Nitrogen-doped γ-graphdiyne (N-GDY) has promising applications in energy, electronic devices, and catalysis, but its properties vary significantly with the distribution of N-dopants and can be hardly investigated due to massive doping patterns. This work addressed the challenge through the machine-learning-based molecular dynamics simulations, and predicted the mechanical properties of N-GDY using a customized well-trained DeepMD-based machine learning potential (MLP). It is demonstrated that N-doping can undermine the ultimate tensile strength of N-GDY remarkably when the stress is applied along N-doped chains, particularly when the N-doping happens at the nearest carbon to the benzene ring. The synergetic effect of neighboring N-doped carbon chains on the anisotropic mechanical properties of N-GDY has been further explored. This computational effort not only clarifies the correlation between the tensile mechanical properties of N-GDY and N-doping patterns towards potential applications in energy storage and flexible devices, but also demonstrates the capacity of MLP to predict complicated mechanical properties of carbon nanomaterials from massive datasets.