The CdS-
WO3 nanocomposite was successfully synthesized using the hydrothermal method. The catalytic capacity of CdS-
WO3 nanocomposite was evaluated based on various parameters, such as pH, catalyst load, bicarbonate and persulfate concentrations. The ratios of CdS to WO3 was also examined to acquire the photocatalytic performance in addition, the by–products and pathway were also studied. The findings showed that CdS-
WO3 (ratio 3:7) produced better photodegradation performance in comparison to CdS-
WO3 (ratio 1:1). Also, from the same investigation, the CdS-
WO3 nanocomposite exhibited a slightly higher catalytic ability in the presence of 150 mg L–1 S2O82– ions (at pH 3) than with bicarbonate ions. A 40% degradation was observed in the presence of 150 mg L–1 S2O82– ions (at pH 3). Moreover, about 38% of adsorption was observed with bicarbonate ions. In this study, we systematically reveal the underlying mechanism of the improved photoactivity of CdS–WO3 nanocomposite using a hybrid density functional theory calculation. The interfacial interaction led to the formation of a built–in internal electric field at the CdS–WO3 interface to promote the separation of charge carriers, The theoretical results rationalise the experimental findings and offer a new understanding of the underlying mechanism of the photoactivity of CdS–WO3 nanocomposite. The degradation pathway of Ethylparaben, which involved dealkylation of ethyl unit was proposed.