We report the synthesis of N–S-doped mesoporous carbon (NSMC) using bone char (BC) as template and heteroatoms precursor. The efficiency of process was evaluated through the synthesis of a material without the use of BC (SC). The materials were properly characterized and textural analysis showed that the BC led to increase of surface area and mesoporous volume for NSMC (568m2g−1 and 0.294cm3g−1) as compared to SC (518m2g−1 and 0.130cm3g−1). The doping of NSMC’s lattice was evaluated from XPS survey spectra. The spectra deconvolution showed that sulfur was incorporated as thiophene and oxidized sulfur, while nitrogen was incorporated as pyridinic, pyrrolic and graphitic, with relative composition of 2.29% and 1.63%, respectively. The Raman and X-ray diffraction analyses showed that the use of BC led to decrease in the intensity of graphitic-band, indicating the doping of carbon lattice. The pHpzc analysis showed that NSMC’s surface has acidic character with pH 3.50, which favored the ibuprofen (IBF) adsorption at pH 4.0, once at this pH value, approximately 87% of IBF species are in protonated form, according to the distribution diagram of species. Adsorption kinetic studies indicated the pseudo-second order model as the best to describe the experimental data. Moreover, adsorption equilibrium studies revealed that the Langmuir model allowed the determination of NSMC’s adsorption capacity (56.78mgg−1); while thermodynamic study showed that the adsorption is a spontaneous and exothermic process. From the results obtained adsorption mechanism of IBF onto the NSMC was proposed.