Iron-doped nano CdS was prepared in air and underflow of nitrogen applying the thermolysis technique. The impact of air and nitrogen atmosphere on the crystallinity and the different structure parameters of the obtained samples was investigated using X-ray diffraction measurements and applying Rietveld method. Analysis revealed the presence of two phases for CdS; hexagonal wurtzite and cubic zincblende with phase percentages greatly affected with preparation conditions; sample obtained under N 2 is almost pure hexagonal (97%). The particle morphology was investigated by FE-SEM, and the associated EDS spectra manifested elements percentages in accordance with those intended for preparation. The optical bandgap was greatly affected; compared with samples formed in air, it reduced upon doping with Fe as well as upon preparation under N 2 , it decreased from 2.58 eV for pristine CdS to 1.99 eV for Fe-doped CdS under N 2 . The photoluminescence (PL) intensity was also affected by the condition of preparation and iron doping. Pure and Fe-doped CdS samples emitted violet and blue colors. Density function theory (DFT) calculations were performed to explain the reason for the reduction of the optical bandgap upon doping CdS with Fe. The comparison between different electronic characteristics of pure and Fe-doped CdS samples was explored also by DFT calculation.