In this study, a series of SnO2/g-C3N4 flowerlike composites with a range of mass ratios were effectively prepared by combining hydrothermal synthesis with ultrasonic calcination. To describe the nanostructures and optical qualities of the created composites, XRD, SEM, TEM, XPS, BET, FT-IR, UV-Vis DRS, and PL research were carried out. The photocatalytic activities of the developed SnO2/g-C3N4 flowerlike composite were examined by the oxidation of the malachite-green (MG) dye with ultraviolet (UV) radiation. Surprisingly, the Sn/CN-3 composite, which has a mass ratio of 3:1 for SnO2 to g-C3N4, outperformed pure SnO2, g-C3N4, and other SnO2/g-C3N4 flowerlike composites in terms of photocatalytic activity. The Sn/CN-3 combination produced an excellent 95.09% degradation of MG after 80 min of UV light irradiation. Furthermore, throughout five recycling experiments, the Sn/CN-3 composite also exhibited superior durability and stability. The primary reactive species driving the degradation process, ‧O2 , was proved, and a prospective mechanism was proposed to account for the improvement of photocatalytic activity of the SnO2/g-C3N4 flowerlike composites. The synergistic interaction between SnO2 and g-C3N4 and the composites' significantly higher specific surface area are causing the rise in photocatalytic activity. These findings emphasize the potential for SnO2/g-C3N4 flower-like composites to be used as highly effective photocatalysts in a variety of applications, particularly in wastewater treatment.