This paper presents an evolutionary algorithm for the robust motion controller design in mechatronics systems, using a genetic algorithm. The control system is composed of a robust 2-DOF compensator based on the coprime factorization description. Conventional controller design approaches to the optimization for compensator free parameters essentially requires complicated numerical procedures under given control specifications. In this study, a practical algorithm for the compensator design of motion. control systems is proposed, where the optimal combination of the compensator free parameters can be autonomously tuned to satisfy the specified motion control performance by the optimization ability of the genetic algorithm. The effectiveness of the proposed optimal design can be verified by experiments using a prototype, paying attention to the system robustness against variations of mechanical parameters and the fast convergence of the optimization by the genetic algorithm.