Manufacturing industry can directly reflect the level of national productivity, and energy-saving. Efficient intelligent manufacturing can be realized via utilizing the optimization of production scheduling. In this paper, according to the actual situation of flexible job-shop scheduling problem, a mathematical model is established to minimize both the maximum completion time and the energy consumption of processing machines. The coding method, generation of initial population, evolution stage and selection operation of the algorithm are optimized, aiming to improve the shortcomings of the genetic algorithm, the convergence speed of the algorithm as well as the quality of the final optimal solution. A machine-process double layer coding scheme based on roulette probability selection machine is designed to ensure that the machine segment coding can meet the requirement of minimum completion time. In order to improve the quality of the initial population, a method of generating the initial population is designed to make the initial population evenly distributed in the solution space. The evolutionary process is divided into two parts, namely, crossover in the early stage and mutation in the later stage. In addition, the population diversity can be improved, and the proposed algorithm can avoid falling into the local optimal. Simulation results verify the stability of the improved genetic algorithm and the effectiveness and feasibility of the flexible job-shop scheduling. The job-shop scheduling operators can select a group of feasible solutions for job-shop scheduling according to different weights and actual conditions.