In this research, a new machine-learning approach was proposed to evaluate the effects of eight input parameters (surface area, relative compactness, wall area, overall height, roof area, orientation, glazing area distribution, and glazing area) on two output parameters, namely, heating load (HL) and cooling load (CL), of the residential buildings. The association strength of each input parameter with each output was systematically investigated using a variety of basic statistical analysis tools to identify the most effective and important input variables. Then, different combinations of data were designed using the intelligent systems, and the best combination was selected, which included the most optimal input data for the development of stacking models. After that, various machine learning models, i.e., XGBoost, random forest, classification and regression tree, and M5 tree model, were applied and developed to predict HL and CL values of the energy performance of buildings. The mentioned techniques were also used as base techniques in the forms of stacking models. As a result, the XGboost-based model achieved a higher accuracy level (HL: coefficient of determination, R2 = 0.998; CL: R2 = 0.971) with a lower system error (HL: root mean square error, RMSE = 0.461; CL: RMSE = 1.607) than the other developed models in predicting both HL and CL values. Using new stacking-based techniques, this research was able to provide alternative solutions for predicting HL and CL parameters with appropriate accuracy and runtime.