Mobile Agent (MA) is an autonomous entity that can move from a host to another under self-control. It's a technology for distributed system computing and communication. Although, it creates serious theoretical and practical problems like heterogeneity, preservation of communication, shared resource management and particularly security problem that represents a crucial point for the use of mobile agent applications. To perform its tasks, the agent must move from one site to another, which makes its behavior more vulnerable to different types of attack. To tackle this problem and improve the security of mobile agents, we propose an approach based on Artificial Immune System (AIS). DNA technique is used for code's encryption and fragmentation. Thus, this new solution is twofold: it protects agents during their migration and it ensures the verification of their trusts while their reception by the destination.