ZigBee, an emerging wireless sensor network technology, has wide application and its security is increasingly significant. This paper presents its security architecture, security service, security model, security components, security keys and trust center and security policy of each layer. The paper also gives its security implementation steps. The paper eventually proposes a new idea for its key management, which is favorable to its security enhancement.