The flexible job shop scheduling problem (FJSP) is a difficult discrete combinatorial optimization problem, which has been widely studied due to its theoretical and practical significance. However, previous researchers mostly emphasized on the production efficiency criteria such as completion time, workload, flow time, etc. Recently, with considerations of sustainable development, low-carbon scheduling problems have received more and more attention. In this paper, a low-carbon FJSP model is proposed to minimize the sum of completion time cost and energy consumption cost in the workshop. A new bio-inspired metaheuristic algorithm called discrete whale optimization algorithm (DWOA) is developed to solve the problem efficiently. In the proposed DWOA, an innovative encoding mechanism is employed to represent two sub-problems: Machine assignment and job sequencing. Then, a hybrid variable neighborhood search method is adapted to generate a high quality and diverse population. According to the discrete characteristics of the problem, the modified updating approaches based on the crossover operator are applied to replace the original updating method in the exploration and exploitation phase. Simultaneously, in order to balance the ability of exploration and exploitation in the process of evolution, six adjustment curves of a are used to adjust the transition between exploration and exploitation of the algorithm. Finally, some well-known benchmark instances are tested to verify the effectiveness of the proposed algorithms for the low-carbon FJSP.