The representative volume elements and molecular dynamics (MD) simulation are frequently used to compute the mechanical behavior of polymer nanocomposites. In previous studies, the polymer curing process was often not considered in the simulation process, thus the effect of residual stresses imposed on nanoparticles, matrix, and the interphase material between the nanoparticles and the matrix were not studied. In the present paper, the effect of curing-induced residual stresses of the nanoparticle, matrix, and interphase material on the mechanical behavior of nanocomposites was studied in detail. A model of nanocomposites was constructed using an in-situ curing process by the MD simulation. The modulus of the nanocomposite is obtained as 3.75 GPa, indicating a 60% improvement compared to that of the pure polymer. The results of the tensile loading of nanocomposites show that the residual stress on CNT was obtained as -197 MPa which is 33% of the maximum value of the applied stress on nanocomposites. The MD model is validated by analysis of the mechanical behavior of the isolated CNT and pure polymer block under tensile loads as well as the CNT pullout simulation.