Photovoltaic power generation prediction constitutes a significant research area within the realm of power system artificial intelligence. Accurate prediction of future photovoltaic output is imperative for the optimal dispatchment and secure operation of the power grid. This study introduces a photovoltaic prediction model, termed ICEEMDAN-Bagging-XGBoost, aimed at enhancing the accuracy of photovoltaic power generation predictions. In this paper, the original photovoltaic power data initially undergo decomposition utilizing the Improved Complete Ensemble Empirical Mode Decomposition with Adaptive Noise (ICEEMDAN) algorithm, with each intrinsic mode function (IMF) derived from this decomposition subsequently reconstructed into high-frequency, medium-frequency, and low-frequency components. Targeting the high-frequency and medium-frequency components of photovoltaic power, a limiting gradient boosting tree (XGBoost) is employed as the foundational learner in the Bagging parallel ensemble learning method, with the incorporation of a sparrow search algorithm (SSA) to refine the hyperparameters of XGBoost, thereby facilitating more nuanced tracking of the changes in the photovoltaic power’s high-frequency and medium-frequency components. Regarding the low-frequency components, XGBoost-Linear is utilized to enable rapid and precise prediction. In contrast with the conventional superposition reconstruction approach, this study employs XGBoost for the reconstruction of the prediction output’s high-frequency, intermediate-frequency, and low-frequency components. Ultimately, the efficacy of the proposed methodology is substantiated by the empirical operation data from a photovoltaic power station in Hebei Province, China. Relative to integrated and traditional single models, this paper’s model exhibits a markedly enhanced prediction accuracy, thereby offering greater applicational value in scenarios involving short-term photovoltaic power prediction.