This paper proposes a method of using machine learning and an evolutionary algorithm to solve the flexible job shop problem (FJSP). Specifically, a back propagation (BP) neural network is used as the machine learning method, the most widely used genetic algorithm (GA) is employed as the optimized object to address the machine-selection sub-problem of the FJSP, and particle swarm optimization (PSO) is utilized to solve the operation-order sub-problem of the FJSP. At present, evolutionary algorithms such as the GA, PSO, ant colony algorithm, simulated annealing algorithm, and their optimization algorithms are widely used to solve the FJSP; however, none of them optimizes the initial solutions. Because each of these algorithms only focuses on solving a single FJSP, they can only use randomly generated initial solutions and cannot determine whether the initial solutions are good or bad. Based on these standard evolutionary algorithms and their optimized versions, the JSON object was introduced in this study to cluster and reconstruct FJSPs such that the machine learning strategies can be used to optimize the initial solutions. Specifically, the BP neural networks are trained so that the generalization of BP neural networks can be used to judge whether the initial solutions of the FJSPs are good or bad. This approach enables the bad solutions to be filtered out and the good solutions to be maintained as the initial solutions. Extensive experiments were performed to test the proposed algorithm. They demonstrated that it was feasible and effective. The contribution of this approach consists of reconstructing the mathematical model of the FJSP so that machine learning strategies can be introduced to optimize the algorithms for the FJSP. This approach seems to be a new direction for introducing more interesting machine learning methodologies to solve the FJSP.