This study proposes a new approach to prepare polyimide (PI)-based nanocomposites containing amino groups functionalized graphene oxide (GO-NH2) via in situ polymerization and thermal imidization. GO-NH2 nanosheets which exhibit excellent dispersibility and compatibility with the PI matrix were successfully obtained through the chemical reaction between graphene oxide (GO) and p-phenylenediamine (PDA). The mechanical properties, thermal stability and hydrophobic behavior of the PI/GO-NH2 composites were significantly improved compared with those of pure PI because of excellent dispersion of GO-NH2 and the strong interfacial covalent bonds between GO-NH2 and the PI matrix. With a 3wt% GO-NH2 loading, the tensile modulus of PI/GO-NH2 nanocomposites was increased from 1930MPa to 3139MPa, and the tensile strength was increased from 101.5MPa to 156.8MPa, which were approximately 63% and 54.5% enhancement compared to the pure PI, respectively. The 10% weight loss temperature of PI/3wt% GO-NH2 is improved 24°C compared with neat PI film (539.5°C). Furthermore, the hydrophobic behavior of the composite films is greatly improved. This effective approach provides a strategy for developing high-performance and multifunctional polymer-based composite materials.