Here, chemically synthesized CdS nanocrystals have been irradiated with swift heavy ions (SHI) with an aim to study the changes in its optical constants such as refractive index and dielectric constant along with the bandgap modification. Scanning electron microscopy (SEM) shows spherical morphology of the pristine CdS nanocrystals with an average size of 17 nm, which gets slightly deviated from its spherical morphology after SHI irradiation. X-ray diffraction (XRD) study reveals a change in the lattice structure of CdS nanocrystals from cubic to hexagonal phase due to irradiation. Structural information obtained from the XRD data has been fed as an initial input parameter in the first principles study (DFT + U) using the Quantum Espresso package for determining refractive index, dielectric constant, band gap and thermal properties theoretically. All these theoretically obtained values of optical constants match approximately with the values obtained from the experimental UV–Visible data analysis. Finally, the value of threshold electronic energy loss has been determined from the Thermal spike model.