The precise forecasting of renewable energy production and usage is essential for the stability, efficiency, and sustainability of contemporary power systems. This requirement is especially urgent in South Africa, a nation currently grappling with considerable energy issues, such as recurrent load shedding, outdated coal-fired power plants, and an increasing electricity demand. As the country moves towards a more renewable-focused energy portfolio, the capacity to anticipate future energy requirements is crucial for effective planning, operational stability, and grid resilience. This study introduces a hybrid approach that combines deep learning and machine learning techniques, specifically integrating long short-term memory (LSTM) neural networks with extreme gradient boosting (XGBoost) to provide more accurate and detailed forecasts of energy demand. LSTM networks are particularly effective in capturing long-term temporal dependencies in sequential data, such as patterns of energy usage. At the same time, XGBoost delivers high-performance gradient-boosted decision trees that can manage non-linear relationships and noise present in extensive datasets. The proposed hybrid LSTM-XGBoost model was trained and assessed using high-resolution data on energy consumption and weather conditions gathered from a coastal municipality in KwaZulu-Natal, South Africa, a country that exemplifies the convergence of renewable energy potential and challenges related to energy reliability. The preprocessing steps, including normalization, feature selection, and sequence modeling, were implemented to enhance the input data for both models. The performance of the model was thoroughly evaluated using standard statistical metrics, specifically the mean absolute error (MAE), the root mean squared error (RMSE), and the coefficient of determination (R2). The hybrid model achieved an MAE of merely 192.59 kWh and an R2 of approximately 0.71, significantly surpassing the performance of the individual LSTM and XGBoost models. These findings highlight the enhanced predictive capabilities of the hybrid model in capturing both temporal trends and feature interactions in energy consumption behavior.