The short-circuit current density ( J SC ) of CdTe solar cells both in the short and long wavelength regions can be effectively enhanced by using CdS/CdSe as the composite window layer. CdS/CdSe composite layers would interdiffuse to form the CdSe x S 1- x ternary layer during the high temperature deposition process of CdTe films. In this paper, the electronic properties of CdSe x S 1- x (0 ≤ x ≤ 1) ternary alloys are investigated by first-principles calculation based on the density functional theory (DFT) and the performance of CdS/CdSe/CdTe devices are modeled by SCAPS to reveal why CdS/CdSe complex layers have good effects. The calculation results show that the position of the valence band of CdSe x S 1- x moves towards the vacuum level as the doping concentration of Se increases and the band gap becomes narrow. According to device modeling, the highest conversion efficiency of 20.34% could be achieved through adjusting the conduction band offset (CBO) of theCdSe x S 1- x /CdTe interface to about 0.11 eV while the Se concentration x approaches 0.75. Further investigations suggest a 50-120 nm thickness of CdSe x S 1- x ( x = 0.75) would obtain better device performance. It means that solar cells with a CdSe x S 1- x /CdTe structure need a suitable Se content and thickness of CdSe x S 1- x . These results can provide theoretical guidance for the design and fabrication of high efficiency CdTe solar cells.