This research proposes a methodology for the selection of input variables based on eXplainable AI (XAI) for energy consumption prediction. For this purpose, the energy consumption prediction model (R2 = 0.871; MAE = 2.176; MSE = 9.870) was selected by collecting the energy data used in the building of a university in Seoul, Republic of Korea. Applying XAI to the results from the prediction model, input variables were divided into three groups by the expectation of the ranking-score (Fqvar) (10 ≤ Strong, 5 ≤ Ambiguous < 10, and Weak < 5), according to their influence. As a result, the models considering the input variables of the Strong + Ambiguous group (R2 = 0.917; MAE = 1.859; MSE = 6.639) or the Strong group (R2 = 0.916; MAE = 1.816; MSE = 6.663) showed higher prediction results than other cases (p < 0.05 or 0.01). There were no statistically significant results between the Strong group and the Strong + Ambiguous group (R2: p = 0.408; MAE: p = 0.488; MSE: p = 0.478). This means that when considering the input variables of the Strong group (Fqvar: Year = 14.8; E-Diff = 12.8; Hour = 11.0; Temp = 11.0; Surface-Temp = 10.4) determined by the XAI-based methodology, the energy consumption prediction model showed excellent performance. Therefore, the methodology proposed in this study is expected to determine a model that can accurately and efficiently predict energy consumption.