Abstract Thiosulfate is a green leaching agent used in the hydrometallurgical process because it is both environmentally benign and can form the required soluble ion complexes. In this article, a novel method for the synthesis of CdS–Ag2S nanocomposites from a solution of relevant ion complexes via ultrasound-assisted ultraviolet (UV) photolysis was proposed. An analysis of the mechanism revealed that the complexes undergo a series of photochemical reactions. The CdS–Ag2S nanocomposites were synthesized by photochemical co-precipitation under UV-C irradiation. The microstructure, chemical composition, optical and electrochemical properties of the prepared nanocomposites were analyzed to verify the synthesis and investigate the product. The photodegradation of methyl orange (MO) under a xenon lamp was performed to determine the photocatalytic activity. Under visible light irradiation, the CdS–Ag2S nanocomposites undergo the electrons transition (from valence band to conduction band) to form photogenerated electron–hole pairs realizing the effective separation of carriers and finally promote the degradation of MO to water and carbon dioxide. The subsequent degradation efficiency of the CdS–Ag2S nanocomposites was found to be 87% after 90 min, and it was larger than 78% for pure CdS prepared via UV photolysis, indicating that the as-developed novel method can effectively fabricate CdS–Ag2S photocatalyst with superior performance.