The research aims to investigate the mechanical properties of graphene nanocomposites using molecular dynamics (MD) simulation. Three different formats of graphene, i.e., graphene flakes, intercalated graphene and intercalated graphene oxide, were incorporated respectively in polyimide matrix to form the graphene nanocomposites. The mechanical properties of the nanocomposites including Young's modulus, glass transition temperature (Tg) and coefficient of thermal expansion (CTE), in terms of the different formats of graphene were characterized in this study. In addition to the mechanical properties, the influences of graphene on the morphology, density and order parameter of the polyimide polymers were also examined. Results illustrated that the local density in the vicinity of the graphene is relatively high and then decreases to the bulk value as the region is away from the interface. Furthermore, it was found that the polyimide chains near the graphene are densely compacted and flattened down parallel to the graphene interface. On the other hand, for the mechanical and thermal properties, the nanocomposites with dispersed graphene exhibit higher Young's modulus, higher glass transition temperature and lower thermal expansion coefficient than those with graphene flakes. This is because the dispersed graphene leads to high degree of ordered polymer in the nanocomposite and thus enhances the overall properties of the nanocomposite. In addition, the interacted graphene oxide provides the best reinforcement among the three cases of nanocomposites. Based on the calculation of interaction energy, it was validated that the oxide modification on graphene surface can effectively enhance the interaction energy, and such enhancement in interaction energy may be responsible for the improvement of mechanical properties of graphene oxide nanocomposites.