Pharmaceutical wastewater is a major source of environmental contamination, often containing toxic metals that pose significant threats to ecosystems and public health. This study explores the potential of magnetite/zinc oxide (Fe3O4/ZnO) nanocomposites prepared using a sol-gel method for the removal of lead, cadmium, and copper ions from pharmaceutical wastewater. The nanocomposite was characterized using X-ray diffraction (XRD), High-resolution scanning electron microscopy (HRSEM)/energy dispersive spectroscopy (EDS) and Fourier transmission infrared spectroscopy (FTIR). The XRD analysis of the nanocomposite identified 2θ (theta), of 31.7º, 34.4º, 36.2º, 47.5º, 56.6º, 62.8º, 66.3º, and 67.9º which correspond to the crystal planes of (100), (002), (101), (102), (110), (103), (200), and (112), respectively. The diffraction peaks associated with Fe3O4 at 2θ of 18.02º, 29.4º, and 43.3º, related to the crystal planes of (111), (220), and (400), respectively of the Fe3O4 phase. The HRSEM image of the nanocomposite exhibited spherical-shaped structures of Fe3O4/ZnO, and some irregular shapes. The effects of the contact time, dosage and temperature on the removal percentage of toxic metal ions were studied. Freundlich and Langmuir isotherm constants and correlation coefficients were determined and the equilibrium process was better described by the Langmuir isotherm. The adsorption process followed a second order kinetics and the thermodynamic parameters showed that the involved process was spontaneous. These findings contribute to the advancement of environmentally friendly technologies for the pharmaceutical industry and the broader field of wastewater remediation.