The invention discloses a method for selecting and matching complex mechanical products based on genetic algorithm, which comprehensively considers shape and position tolerance and dimension tolerance, through the coding method of complex dimension chain, the assembly problems of complex mechanical products are mapped into mathematical models, assembly accuracy and assembly success rate are used as the evaluation indexes of quality requirements, a comprehensive optimization model of selection and matching under the multi-quality requirements is established, by using the effective characterization form of the measured values of geometrical tolerances in the selection, the optimization model of geometrical tolerances and dimensional tolerances is established, Based on Pareto intensity and density as fitness evaluation criteria of genetic algorithm, the algorithm is improved by introducing the priority of parts and the priority of quality requirement. The method not only realizes the selection and matching of complex mechanical products, improves the success rate of assembly, ensures the assembly accuracy, ensures the dimensional tolerance assembly accuracy, but also effectively reduces the shape and position tolerances of products, and the genetic algorithm with the priority of selection and matching has a better convergence speed.