A discrete whale optimization algorithm (DWOA) is presented to solve the no-wait flow shop scheduling problem (NWFSSP) with the optimization objective makespan. An effective combination of nearest neighbor (NN) and standard deviation heuristics (SDH) is used to acquire initial solutions of the population. After that, three crossover operators, the two-point crossover (TPX), multiple-point crossover (MPX) and job-based crossover (JBX) operators, are designed to mimics the humpback whales hunting process. Moreover, the dynamic transform mechanism of search process is designed to better balance the exploration and exploitation ability of DWOA. In order to further improve the optimization effect of DWOA, the parallel neighborhood search (PNS) and the serial neighborhood search (SNS) are selected to execute the local search and promoting global search scheme, respectively. Finally, to test the performance of DWOA, extensive experiments are conducted on benchmarks designed by Reeves and Taillard, which contain parameters tuning, effectiveness of the improvement strategies in the DWOA and comparison with several existing algorithms. From the experimental results, it is validated that the effectiveness of the improved mechanisms and the performance of the DWOA which can find better makespan values compared with other algorithms for solving NWFSSP.