In this paper, a Genetic-Artificial Bee Colony Algorithm (G-ABCA) for mechanism optimization synthesis is proposed to improve the accuracy of the dimensional synthesis of the 4-bar mechanism. Firstly, the plane coordinate of the 4-bar mechanism was determined. Then, the relevant design parameters of the link motion were analyzed. The objective function was constructed to minimize the position error between the actual trajectory of the mechanism and the target trajectory, constraints of the 4-bar plane mechanism were added. Then, by means of the improved artificial bee colony algorithm, the length, size and angle variables of the 4-bar mechanism were optimized. The parameters of the classical case were optimized. Finally, the optimization results of the algorithm were simulated for the optimized parameters of the 4-bar mechanism. The results were compared to other optimization algorithms. The results show that the trajectory error obtained by the improved artificial bee colony algorithm is smaller and the optimization effect of the parameters of the 4-bar mechanism is better. The proposed algorithm improves the crossover rate between food sources, extends the population optimization space, improves the local search ability and prevents the premature convergence of the genetic algorithm. The validity and accuracy of the method are proved, which provides a theoretical basis for the in-depth study of the trajectory error of the 4-bar mechanism.