Accurate short-term solar power forecasting is essential for ensuring efficient operation, stability, and intelligent energy management in hybrid renewable energy systems. This study presents an Extreme Gradient Boosting (XGBoost)-based framework for short-term solar power forecasting using real-time experimental data acquired from the Heipang Hybrid Solar–Wind Test Rig, located in Heipang community, Barkin Ladi Local Government Area of Plateau State, Nigeria. The proposed model utilizes meteorological and operational variables, including solar irradiance, ambient temperature, relative humidity, wind speed, and historical photovoltaic power output, to predict short-term solar energy generation under dynamic environmental conditions. Data preprocessing techniques such as normalization, outlier filtering, and feature engineering were employed to improve model robustness and predictive capability. The XGBoost algorithm was optimized through hyperparameter tuning to effectively capture nonlinear relationships and complex interactions among weather-dependent variables influencing photovoltaic performance. Model evaluation was conducted using standard statistical performance metrics, including Root Mean Square Error (RMSE), Mean Absolute Error (MAE) and coefficient of determination (R²). Experimental results demonstrated that the developed XGBoost model achieved high forecasting accuracy, fast computational performance, and strong generalization capability under fluctuating meteorological conditions. The findings indicate that gradient boosting techniques provide a reliable and scalable solution for real-time solar power forecasting and smart grid applications. This study contributes to the advancement of data-driven renewable energy forecasting approaches for sustainable hybrid energy system optimization and improved power dispatch planning in developing regions.