The escalating levels of hazardous pharmaceutical contaminants, specifically nonsteroidal anti-inflammatory drugs (NSAIDs), in groundwater reservoir surfaces and surface waterway systems have prompted substantial scientific interest regarding their potential deleterious effects on both aquatic ecosystems and human health. Extraction of those pollutants from wastewater is quite challenging. Hence, the development of economic, sustainable, and scalable techniques for capturing and removing those pollutants is crucial to ensure water safety. Herein, we demonstrate a physicochemically stable, reusable, porous Hf(IV)-based cationic metal-organic framework (MOF), namely, 1'@MeCl for the aqueous phase adsorption-based removal of NSAIDs (diclofenac, naproxen, ibuprofen) from the wastewater environment. The highly positively charged surface of the 1'@MeCl MOF enables it to selectively extract more than 99% of diclofenac, naproxen, and ibuprofen contaminants within less than 30 s. With fast adsorption kinetics, very high adsorption capacities (Qe) were achieved at neutral pH for diclofenac (482.9 mg/g), naproxen (295.9 mg/g), and ibuprofen (219.5 mg/g). Moreover, the influence of changes in pH and coexisting anions on the adsorption property of the 1'@MeCl MOF was studied. Furthermore, the adsorption efficiency of 1'@MeCl in different real water environments was ensured by performing diclofenac, naproxen, and ibuprofen adsorption from tap, river, and lake water. Moreover, a 1'@MeCl-anchored cellulose acetate-chitosan membrane was developed successfully to demonstrate the membrane-based extraction of diclofenac, naproxen, and ibuprofen from contaminated water. Furthermore, a molecular-level mechanistic study was performed through experimental and computational study to propose the plausible adsorption mechanisms for diclofenac, naproxen, and ibuprofen over the surface of 1'@MeCl.