The Internet of Medical Things (IoMT) heralds a transformative era in healthcare, with the potential to revolutionize patient care, healthcare services, and medical research. As with all technological progressions, IoMT introduces a suite of complex challenges, predominantly centered on security. In particular, ensuring the integrity, confidentiality, and availability of health data in real-time communication stands paramount, given the sensitivity of the information and the ramifications of potential breaches or misuse. In light of these challenges, existing security frameworks, while commendable, exhibit limitations. Specifically, they often grapple with comprehensive anomaly detection, effective resistance to replay attacks, and robust protection against threats like man-in-the-middle attacks, eavesdropping, data tampering, and identity spoofing. The proposed framework integrates state-of-the-art encryption techniques, cuttingedge pattern recognition modules, and adaptive learning mechanisms. These components collaboratively ensure data integrity during transmission, provide robust resistance against conventional and novel attack vectors, and adapt to evolving threats through continuous learning. Moreover, the framework incorporates sophisticated checksum techniques and advanced behavioral analysis, further enhancing its protective capabilities. Our system demonstrated significant improvements in anomaly detection and attack resistance metrics, consistently outperforming benchmark solutions like MRMS and BACKM-EHA.