Crystal defects play a vital role in physical and chemical properties of two-dimensional (2D) materials. The computational cost for a real defective system with more than thousands of atoms is considerably high. Here, we propose a framework to accurately predict the formation energy of defective 2D materials, graphene and molybdenum disulfide (MoS2), at a large scale, by combining deep learning techniques and density functional calculations. To improve the training performance of deep learning models, a multi-layer structure descriptor using chemical bond parameters is proposed. For the defective graphene (MoS2) over 300 nm2 (650 nm2), the calculated mean absolute error for the formation energy is less than 47 meV (53 meV) per 1000 atoms. This study provides a practical solution for the accurate and rapid description of large-scale defective 2D materials.