Machine-to-Machine (M2M) communication refers to applications that run on intelligent devices or machines. It allows smart devices to communicate directly with each other with little or no human intervention.In a telerobotic system, medical devices interact with each other and exchange information automatically to provide visual assistance to physicians during surgery. Wireless communication provides attackers with numerous options to gain access to sensitive data and carry out malicious operations.A small communication delay in the telerobotic system can have a significant impact on the performance of medical equipment, potentially putting the patient's life in danger. Additionally, it can slow down the entire system in an operating room. Here, an energy-efficient and secured M2M network is presented to make the system robust.The system is designed with Event-Driven Duty Cycling (EDDC) routing protocol for enhancing the energy of medical sensor nodes. A Denial-of-Service (DoS) attack is performed and network performance is measured through Quality of Service (QoS) parameters. The results of the proposed routing protocol are compared with those of the LEACH and ECFU.The EDDC protocol outperforms even when attacks are launched.