CoFe2O4 and CoFe2O4/SiO2 were synthesized by sol-gel method. The studies carried out using XRD, FT-IR, SEM, TEM, VSM, UV–Vis DRS, and Z-scan techniques. The CoFe2O4 has the inverse cubic spinal structure. TEM and SEM confirmed the less crystallite size of CoFe2O4/SiO2 nanocomposite than CoFe2O4. The results show that two samples have a pure single phase cobalt ferrite with face-centred cubic spinel phase. SiO2 matrix in CoFe2O4 nanocomposite results in reduction particle size and magnetic properties as well as enhancement band gap. The band-gap energy of CoFe2O4 and CoFe2O4/SiO2 calculated 1.76 and 1.92 eV, respectively. Our findings in nonlinear optical aspects suggest that the distinctive characteristics of CoFe2O4/SiO2 present opportunities for advancements in telecommunications and other related fields.