Separation membranes have gained attention as promising options for water and wastewater treatment due to their financial sustainability, and eco-friendliness. However, practical challenges have limited their application in water separation. To overcome these limitations, inorganic-organic hybrid membranes have been developed in this study. The present work deals with two attractive aspects: (i) economical, through the valorization of a local clay (Algerian kaolin), and (ii) environmental, which is based on the membrane selectivity for metal ions. The principal objective of this work is the development of enhanced nanocomposite membranes. It is achieved with low costs, based on cellulose triacetate (CTA) as a polymeric matrix modified by the addition of a lamellar filler, i.e. yellow clay obtained from Jijel, located in the east of Algeria, and plasticized by dioctyl phthalate (DOP). A further objective of this paper was the treatment of wastewater polluted by lead (Pb2+) and cadmium (Cd2+). The prepared membranes were characterized by various characterization techniques, including scanning electron microscopy (SEM), Fourier-transform infrared (FTIR) spectroscopy and thermogravimetric analysis (TGA). All synthetized membranes had an amorphous structure, with homogeneous pore morphology and distribution. Moreover, the presence of nanocomposite clay showed effective integration into the membrane matrix and led to a significant improvement in thermal resistance. These membranes were applied to treat a synthetic aqueous solution contaminated with heavy metals, namely Pb2+ and Cd2+. The results revealed a rejection rate higher than 50%, suggesting the potential effectiveness of a stable and environmentally sustainable polymer inclusion membrane system for water purification.