Dengue is considered a public health problem in tropical regions, periodically affecting an increasing number of citizens. Consequently, the development of efficient models is essentials to short and long-term forecasting, supporting health care officials to optimally disseminate available resources in the dengue-prone areas. Hybridization of two or more models is a common solution to this problem where one can take advantage of diversity among models to reduce both the bias and variances of the prediction error obtained using single models. Fortunately, the use of ensemble approaches becomes attractive. In this paper, we propose a novel ensemble learning approach combining the eXtreme Gradient Boosting (XGBoost) and Coyote Optimization Algorithm (COA) to capture the nonlinearity in a dataset and perform dengue cases forecasting. The performance of the XGBoost model depends upon the appropriate choice of its hyperparameters. In this study, COA has been employed to tune the XGBoost hyperparameters. The proposed hybrid COA-XGBoost model is applied to predicting dengue time-series dataset from Parana, Brazil. Averages of precipitation, temperature, thermal amplitude, relative humidity, and previous dengue cases are considered as input variables as well as dengue cases are used as output variables. The performance of the proposed COA-XGBoost model has been compared with XGBoost when hyperparameters are obtained using other optimization techniques like Differential Evolution, Genetic Algorithm, Cuckoo Search Optimization, Grey Wolf Optimizer, and Firefly Algorithm. The results indicate that the proposed COA–XGBoost can be competitive model when compared to other classical techniques.