The invention discloses a polyimide nanocomposite of a naphthalene structure and a preparation method and application of the polyimide nanocomposite. According to the composite, aromatic-diamine which has high planarity and of the naphthalene structure, various types of tetracarboxylic dianhydride and layered nanoparticles are adopted as raw materials; in the argon atmosphere, the layered nanoparticles are dispersed in strong-polarity nonprotic organic solvent, then diamine and dianhydride are added to dispersing liquid, stirring and a reaction are conducted, and a polyamide acid composite adhesive solution is obtained; or while the layered nanoparticles are dispersed, the diamine and the dianhydride are placed into another container for preparing polyamide acid, then nanoparticle dispersing liquid and the polyamide acid are mixed, and the composite adhesive solution is obtained; finally, the composite adhesive solution is dehydrated, and the polyimide nanocomposite is obtained. According to the polyimide nanocomposite, polyimide molecular chains of the type contain naphthalene nucleuses which are good in planarity and high in rigidity, the prepared nanocomposite has excellent thermal stability and barrier performance in combination with the enhancement effect of the layered nanoparticles, and the polyimide nanocomposite and the preparation method and application of the polyimide nanocomposite can be widely applied to fields of high-performance packaging, electronic device packaging and the like.