The invention discloses a method for solving flexible job shop scheduling based on an improved whale algorithm. The method comprises the following steps: 1) establishing a mathematical model of a flexible job shop scheduling problem; 2) setting algorithm parameters and generating an initial population; 3) obtaining a current optimal scheduling solution; 4) judging whether the current number of iterations is greater than the maximum number of iterations; if yes, outputting a scheduling solution; if not, judging whether the counter value of the current optimal individual is not smaller than a preset value or not; if yes, carrying out variable neighborhood search operation, and updating a scheduling solution; if not, converting the scheduling solution into a whale individual position vector,and retaining the whale individual corresponding to the scheduling solution; and 5) updating whale individual position information by adopting an improved whale algorithm, converting the whale individual position vector into a scheduling solution to complete population updating, adding 1 to the number of iterations, and returning to the step 3). According to the method disclosed by the invention,all optimal solutions of flexible job shop scheduling can be well solved, and the solving speed and precision are improved.