The study of water fluxes is important to better understand hydrological cycles in arid regions. Data‐driven machine learning models have been recently applied to water flux simulation. Previous studies have built site‐scale simulation models of water fluxes for individual sites separately, requiring a large amount of data from each site and significant computation time. For arid areas, there is no consensus as to the optimal model and variable selection method to simulate water fluxes. Using data from seven flux observation sites in the arid region of Northwest China, this study compared the performance of random forest (RF), support vector machine (SVM), back propagation neural network (BPNN), and multiple linear regression (MLR) models in simulating water fluxes. Additionally, the study investigated inter‐annual and seasonal variation in water fluxes and the dominant drivers of this variation at different sites. A universal simulation model for water flux was built using the RF approach and key variables as determined by MLR, incorporating data from all sites. Model performance of the SVM algorithm (R2 = 0.25–0.90) was slightly worse than that of the RF algorithm (R2 = 0.41–0.91); the BPNN algorithm performed poorly in most cases (R2 = 0.15–0.88). Similarly, the MLR results were limited and unreliable (R2 = 0.00–0.66). Using the universal RF model, annual water fluxes were found to be much higher than the precipitation received at each site, and natural oases showed higher fluxes than desert ecosystems. Water fluxes were highest during the growing season (May–September) and lowest during the non‐growing season (October–April). Furthermore, the dominant drivers of water flux variation were various among different sites, but the normalized difference vegetation index (NDVI), soil moisture and soil temperature were important at most sites. This study provides useful insights for simulating water fluxes in desert and oasis ecosystems, understanding patterns of variation and the underlying mechanisms. Besides, these results can make a contribution as the decision‐making basis to the water management in desert and oasis ecosystems.