Crystalline nanoparticles of barium titanate (BT) are incorporated into polyimide (PI) to fabricate highly refractive, anti‐UV‐degradable nanocomposite films with high permittivity and thermal stability. For homogeneous incorporation of BT nanoparticles into the PI matrix, the BT nanoparticles are surface modified by phthalimide with the aid of a silane coupling agent as a scaffold. The PI nanocomposites are prepared by in situ polymerization in which a diphthalic anhydride and a diamine are used to form the PI matrix in the presence of the surface‐modified nanoparticles. The refractive index of the transparent nanocomposite films reaches 1.85 at a nanoparticle content of 59 vol% with a high dielectric constant of ε = 37 and thermal stability up to 460 °C. Copyright © 2012 Society of Chemical Industry