Abstract This study develops data-driven global and region-specific ground-motion models (GMMs) for subduction earthquakes using a weighted average ensemble model to combine four different nonparametric supervised machine-learning (ML) algorithms, including an artificial neural network, a kernel ridge regressor, a random forest regressor, and a support vector regressor. To achieve this goal, we train individual models using a subset of the Next Generation Attenuation-Subduction (NGA-Sub) data set, including 9559 recordings out of 153 interface and intraslab earthquakes recorded at 3202 different stations. A grid search is used to find each model’s best hyperparameters. Then, we use an equally weighted average ensemble approach to combine these four models. Ensemble modeling is a technique that combines the strengths of multiple ML algorithms to mitigate their weaknesses. The ensemble model considers moment magnitude (M), rupture distance (Rrup), time-averaged shear-wave velocity in the upper 30 m (VS30), and depth to the top of the rupture plane (Ztor), as well as tectonic and region as input parameters, and predicts various median orientation-independent horizontal component ground-motion intensity measures such as peak ground displacement, peak ground velocity, peak ground acceleration, and 5%-damped pseudospectral acceleration values at spectral periods of 0.01–10 s in log scale. Although no functional form is defined, the response spectra and the distance and magnitude scaling trends of the weighted average ensemble model are consistent and comparable with the NGA-Sub GMMs, with slightly lower standard deviations. A mixed effects regression analysis is used to partition the total aleatory variability into between-event, between-station, and event-site-corrected components. The derived global GMMs are applicable to interface earthquakes with M 4.9–9.12, 14≤Rrup≤1000 km, and Ztor≤47 km for sites having VS30values between 95 and 2230 m/s. For intraslab events, the derived global GMMs are applicable to M 4.0–8.0, 28≤Rrup≤1000 km, and 30≤Ztor≤200 km for sites having VS30 values between 95 and 2100 m/s.