In this paper, we propose an enhanced key management mechanism using ECDH(Elliptic Curve Diffie-Hellman) and subMAC for wireless sensor networks using ZigBee. ZigBee consumes low power and provides security in wireless sensor networks. ZigBee Pro enhances security and supports a large number of applications. Despite enhanced security, ZigBee Pro has vulnerabilities of key management, i.e., weakness of key distribution. We use ECDH for secure key distribution and subMAC to overcome the weakness of ECDH, i.e., no authentication and no prevention of man-in-the-middle attack. Using subMAC, we provide the authentication for transmitted messages and prevent man-in-the-middle attack and replay attack. Simulation results show our approach using ECDH and subMAC in ZigBee Pro is more efficient than existing ZigBee Pro in terms of run time and energy consumption. We prove security is enhanced.