In the present study, nanocomposites having hierarchical nanoflowers (HNFs) -like morphology were synthesized by ultra-sonication approach. HNFs were ternary composite of MgFe2O4 and bentonite with boron-, phosphorous- co-doped graphene oxide (BPGO). The HNFs were fully characterized using different analytical tools viz. X-ray photoelectron spectroscopy, scanning electron microscopy, energy dispersion spectroscopy, transmission electron microscopy, X-ray diffraction, vibrating sample magnetometry and Mössbauer analysis. Transmission electron micrographs showed that chiffon-like BPGO nanosheets were wrapped on the MgFe2O4-bentonite surface, resulting in a porous flower-like morphology. The red-shift in XPS binding energies of HNFs as compared to MgFe2O4-bentoniteand BPGO revealed the presence of strong interactions between the two materials. Box–Behnken statistical methodology was employed to optimize adsorptive and photocatalytic parameters using Pb(II) and malathion as model pollutants, respectively. HNFs exhibited excellent adsorption ability for Pb(II) ions, with the Langmuir adsorption capacity of 654 mg g−1 at optimized pH 6.0 and 96% photocatalytic degradation of malathion at pH 9.0 as compared to MgFe2O4-bentonite and BPGO. Results obtained in this study clearly indicate that HNFs are promising nanocomposite for the removal of inorganic and organic contaminants from the aqueous solutions.