Hydrogels are indispensable for a variety of applications. Conventional biomaterial-based hydrogels, typically made from proteins or polysaccharides, often suffer from high costs, poor mechanical properties, and limited chemical functionality for modification. In this work, we present a novel hydrogel developed from modified castor oil, which is a renewable and cost-effective resource. Castor oil-based oligomer (CG) was synthesized using glycidyl methacrylate and triethylamine via ring-opening polymerization. The oligomer formed a gel only with Cu2+ ions among the various systematically studied metal ions. Comprehensive density functional theory calculations, atoms in molecules analysis, and steady and dynamic shear rheology were conducted to investigate the metal-binding sites and metal-oligomer interactions as well as the self-healing and viscoelastic properties of the oil-based hydrogels. The hydrogel exhibited 94% self-healing efficiency and performed as a recyclable rhodamine B dye adsorbent (73-90%). This innovative approach offers a novel, cost-effective, and sustainable alternative to traditional hydrogels, paving the way for advanced applications.