Sufficient efforts have been carried out to fabricate highly efficient graphene oxide (GO) lamellar membranes for heavy metal ion separation and desalination of water. However, selectivity for small ions remains a major problem. Herein, GO-based bio-inspired membranes are fabricated by green method and used for selective separation of heavy metal ions and water desalination. The GO is modified with Onion extractive (OE) and fabricated into GO/OE composite membranes. The GO/OE composite membrane (350 nm) shows an excellent rejection efficiency for several heavy metal ions such as Cr6+ (~ 87.5%), As3+ (~ 89.5%), Cd2+ (~ 93.0%), Pb2+ (~ 99.5%), and good water permeance ∼460 ± 20 Lm− 2h− 1bar− 1. In addition, GO/Quercetin (GO/Q) membrane is also fabricated from quercetin for comparative studies. Quercetin is active ingredient of onion extractives. The GO/Q composite membranes show good rejection up to ~ 78.0%, ~ 80.5%, ~ 88.0% and 95.2% for Cr6+, As3+, Cd2+, and Pb2+ respectively with DI water permeance ∼150 ± 10 Lm− 2h− 1bar− 1. Further, both membranes are used for water desalination by measuring rejection of small ions such as NaCl, Na2SO2, MgCl2, and MgSO4. The resulting membranes show ˃70% rejection for small ions. In addition, both membranes use for filtration of Indus River water and GO/Q membrane shows remarkable high separation efficiency and making river water suitable for drinking purpose. Furthermore, the GO/QE composite membrane is highly stable up to ~ 25 days under acidic, basic and neutral environments as compared to GO/Q composite and pristine GO-based membranes.