Distributed Hash Tables ( DHT ) is the key technology for structured P2P system to make resources organized and positioned efficiently. The security threats and the corresponding solving methods existing in the message forwarding process of DHT system were analyzed. Based on multi-path method, a defense mechanism with mixed routing was proposed to optimize the forwarding efficiency and safety. Firstly, a mixed routing combined the advantages of iterative and recursive routing was described in detail, which can efficiently forward the message with fewer messages overhead. Secondly, the message reliability and source authentication mechanism were improved to ensure message security in the forwarding process. In addition, the defense mechanism with mixed routing was tested in Sichuan University campus network. The simulation results showed that it has obvious effect on reducing the number of queries and increasing the success rate of forwarding message, which has a better defense effect against the attack in the forward phase.