AI systems increasingly operate as autonomous decision-making components in safety-critical and mission-critical settings such as clinical decision support, financial risk modeling, intelligent transportation, and critical infrastructure control. In these environments, cybersecurity failures are not limited to downtime; a system can remain available while its output becomes subtly unreliable. This risk is amplified in machine learning because the attack surface includes not only software and networks, but also training data, inference inputs, model parameters, and the third-party dependencies that support deployment pipelines. This paper presents a Self-Healing Cybersecurity Framework (SHCF) for AI-driven systems that treat resilience as a closed-loop control objective rather than a post-incident activity. SHCF integrates (i) behavior- and semantics-aware anomaly detection, (ii) optimization-guided containment that balances security and availability constraints, (iii) cryptographically verifiable recovery to trusted checkpoints, and (iv) reinforcement-learning-driven adaptation to refine policies over time. In controlled experiments using realistic attack patterns data poisoning, adversarial inference manipulation, and parameter tampering SHCF achieves 94–97% detection accuracy, sub-minute containment latency, and greater than 98% post-recovery model fidelity, outperforming signature-based and rule-based baselines that struggle with AI-specific threats.