Different concentrations of nickel oxide (NiO) nanoparticles were successfully inserted into polystyrene (PS) polymer matrix using the solution casting method. X-ray diffraction (XRD), Fourier transform infrared (FT-IR), high-resolution scanning electron microscope (SEM), and UV-Vis techniques are used to characterize the nanocomposites. XRD, SEM, and FT-IR results indicate that PS and NiO nanoparticles have a good interaction and a high degree of complexity. Using UV–Vis technique, the absorbance of nanocomposites is improved by increasing the nanofiller content. Both the Urbach energy (EU) and the optical energy gap (Eg) were calculated using the Urbach relation and the Tauc model. Refractive indices values of nanocomposites display raising trend with NiO content which promote PS/NiO nanocomposites for use in photonic applications and designing optical devices. Nanocomposites' electrical conductivity was also investigated. The electrical conductivity of the nanocomposites has increased significantly due to the uniform dispersion of NiO nanoparticles and by increasing its content. Conduction is achieved by correlated barrier hopping (CBH).