In this research, the cadmium sulfide - graphite carbon nitride (CdS-g-C3N4) nanocomposite was synthesized and characterized by X-ray diffraction (XRD), Field emission scanning electron microscopy (FESEM), energy-dispersive X-ray spectrometer (EDX), and transmission electron microscopy (TEM) techniques. The photocatalytic activity of as-prepared nanocomposite was evaluated in the degradation of ceftriaxone sodium (CTX) antibiotic from aqueous solution under visible light irradiation. The influence of the operational variables such as the amount of photocatalyst (g/L), initial CTX concentration (mg/L), pH, and irradiation time (min) on the photodegradation process was investigated and optimized using response surface methodology (RSM) - central composite design (CCD) model. The maximum degradation percentage (92.55 %) was obtained in the optimal condition, including 0.06 g/L of CdS-g-C3N4 photocatalyst, 15 mg/L of CTX, pH= 10.5, and irradiation time = 81 min. The efficient photocatalytic performance of CdS-g-C3N4 nanocomposite is due to the appropriate alignment of energy levels between the CdS and g-C3N4, which synergistically impact the charge separation and the degradation efficiency of CTX. The kinetics of the photocatalytic degradation process was well described by Langmuir-Hinshelwood’s pseudo-first-order model (kapp = 0.0336 min-1).