The invention provides a flexible job shop scheduling method and system. The method comprises steps that S1, the initial population S is generated based on basic parameters of a flexible job shop scheduling problem FJSP, and the initial population S is taken as a parent population P; S2, the parent population P is selected, crossed and mutated to obtain a temporary progeny population T; S3, basedon the temporary progeny population T, the parent population P is subjected to niche pre-selection operation to obtain a progeny population C; S4, a fitness value of each individual in the progeny population C is calculated, and the individual with the highest fitness value in the progeny population C is taken as the optimal solution of the FJSP; and S5, based on the optimal solution, a job shop corresponding to the FJSP is scheduled. The method is advantaged in that the solution search space can be made to maintain population diversity, the obtained solution can be guaranteed to converge to the global optimum, and thereby the job shop scheduling effect can be improved.