The integrated scheduling problem of container-handling equipment has been gaining prestige in recent years instead of decomposing the problem into a succession of subordinate sub-problems. This is due to decreasing operational costs, waiting time, completion time, and increasing efficiency. This study introduces an unprecedented integrated scheduling problem in a container terminal, wherein a broad range of heterogeneous container-handling equipment are considered, including gantry cranes, straddle carriers, transtainers, trailers, and outbound trucks. In this regard, an optimization model is developed for planning the discharging of heterogeneous containers, including storage and clearance, in three distinctive operational yards, including quay, storage, and clearance. Additionally, a wide range of realistic concerns are reflected, including maintenance operations, transport efficiency, and non-interference constraints. Furthermore, since maintenance operations’ times undeniably impact scheduling programming and involve various uncertainties, a new two-stage data-driven approach is offered to estimate reliable maintenance times. In the first stage, a hybrid machine learning approach is devised to estimate maintenance times, including the improved complete ensemble empirical mode decomposition with adaptive noise (ICEEMDAN), the Takagi–Sugeno–Kang (TSK) fuzzy system, and the minibatch gradient descent with regularization, DropRule, and AdaBound (MBGD-RDA). In the second stage, since estimated maintenance operation times have uncertainty, the distributionally robust optimization (DRO) method with φ-divergence is utilized to tackle this challenge. Finally, a case study and various simulation experiments are investigated to illustrate the validation and applicability of the suggested framework.