The current study addresses an environmental problem of high impact for food processing industries – the efficient use of water contributing to minimize environmental issues concerning water scarcity and improving industrial process sustainability. Lupin beans are highly nutritious seeds, with an increasing use in vegan products. Their characteristic bitter flavor is conferred by the presence of toxic alkaloids, namely lupanine. Although being a rainfed plant with low water requirements, the industrial process to make these beans edible, removing such alkaloids, uses high amounts of fresh water. Nanofiltration, an easy scalable operation, is here investigated for purification of this wastewater, while retaining different organic species, including lupanine, on the retentate. The membrane selected, NF270, present a transmembrane flux of 33 L h−1·m−2 and membrane rejections for lupanine and total organic species of 99.5% and 94.1%, respectively. Further purification of lupanine by solvent extraction and/or resin adsorption was investigated. Amberlite XAD-16 resin and ethyl acetate were selected as promising adsorber and extractant solvent, respectively, for lupanine purification. Overall, the process suggested is able to reclaim around 80% of the wastewater as a water stream with a purity high enough to be recycled in-situ, while 95.4% of lupanine with 78% purity can be isolated corresponding to around 9 Kg of lupanine natural product per ton of dry beans processed. Lupanine conversion to sparteine by reduction using NaBH4/I2 and subsequent distillation under reduced pressure allows the isolation of sparteine in 60% yield and in >95% purity.