With widely applications of Multi-Agent System (MAS) on internet and intranet, how to ensure security regarding multi-agent communication is a big issue. Traditional cryptographic technologies support a coarse granularity security. This paper adopts XML security technology to provide a security mechanism for MAS communication. With the combination of XML security specifications and MAS, the paper presents a fine-grained security model for MAS communication. The model proposed can satisfy the security requirements of MAS communication based on XML data format.