With the rapid development of mobile peer to peer (MP2P) applications, user privacy requirements have become increasingly urgent. However, in distributed, frequent mobility and decentralized MP2P environments, the existing schemes have various security vulnerabilities. To protect user privacy in MP2P environments, a mutual anonymity node privacy protection scheme (NMA) based on network coding is proposed. Our contributions are described as below. We first design a network coding scheme which can defend against various omniscient adversary attacks. Then, the network coding is used in the MP2P file-sharing application, including the resource searching, the resource requesting, the resource responding and the file download, to protect user’s identity, user’s location and routing information. The advantages of the scheme lie in the fact that the network coding and mutli-agent can improve the network load balance, the successful rate of information transmission and the anonymity degree. Both theoretical analysis and the experimental results demonstrate that when the percentage of malicious peers is lower than 50%, the NMA scheme not only can protect the efficient information transmission, but also can hide the user’s identity and other privacy information.