The growing diversity and number of industrial robots make energy consumption prediction and optimization increasingly essential. Current data-driven approaches, particularly those based on multi-layer perception (MLP), have shown feasibility but typically overlook the variability or unknown nature of load-related parameters in real-world applications. This paper presents a KAN-LSTM model designed to accurately predict energy consumption under unknown load conditions, alongside a particle swarm optimization (PSO) algorithm for minimizing energy use. First, an industrial robot dynamics and energy consumption model is established. Then, the KAN-LSTM model is trained on datasets from the AUBO-E5 robot, with its predictions compared to alternative network models. Finally, PSO is applied to optimize energy consumption. Experimental results indicate that the KAN-LSTM model achieves high prediction accuracy (95.7–97.1%) and offers substantial energy optimization potential (53.1–64.7%). Optimized industrial robots are particularly suitable for tasks such as picking and palletizing in the courier industry, saving operational costs and increasing the sustainability of automated systems in logistics environments.