Lot‐streaming flow shops have important applications in different industries including textile, plastic, chemical, semiconductor and many others. This paper considers an n‐job m‐machine lot‐streaming flow shop scheduling problem with sequence‐dependent setup times under both the idling and no‐idling production cases. The objective is to minimize the maximum completion time or makespan. To solve this important practical problem, a novel estimation of distribution algorithm (EDA) is proposed with a job permutation based representation. In the proposed EDA, an efficient initialization scheme based on the NEH heuristic is presented to construct an initial population with a certain level of quality and diversity. An estimation of a probabilistic model is constructed to direct the algorithm search towards good solutions by taking into account both job permutation and similar blocks of jobs. A simple but effective local search is added to enhance the intensification capability. A diversity controlling mechanism is applied to maintain the diversity of the population. In addition, a speed‐up method is presented to reduce the computational effort needed for the local search technique and the NEH‐based heuristics. A comparative evaluation is carried out with the best performing algorithms from the literature. The results show that the proposed EDA is very effective in comparison after comprehensive computational and statistical analyses.