A new composite of cobalt ferrite and Tragacanth gum (TG) was developed and applied to remove methyl orange (MO) and methyl red (MR) from wastewater samples simultaneously. The results showed that the presence of TG improved the capability of cobalt ferrite in removing the pollutants in considerably. The adsorption properties and surface morphology of the sorbent were compared with those of bare cobalt ferrite, TG, and TG grafted copolymer. The properties of the adsorbents were studied using Fourier transform infrared, scanning electron microscope, transmission electron microscope, X-ray diffraction, and vibrating sample magnetometer, and the effects of different factors such as the amount of the adsorbent, sample pH, contact time, and initial concentration were also evaluated and optimized through response surface methodology using central composite design. The optimal conditions for the adsorption of both dyes (100 mg L −1 as the concentration) were pH of 4.0, adsorbent dose of 0.5 mg mL −1 , and contact time of 110 min. Under these conditions, the MO and MR adsorption processes were found to follow pseudo-second-order kinetic model. The equilibrium adsorption data followed the Langmuir isotherm and the highest adsorption capacity was determined to be 336 and 387 mg g −1 for MO and MR, respectively.