• Propose a sale forecasting approach based on LSTM with PSO for E-commerce companies. • The number of hidden neurons and iterations in LSTM are optimized by PSO. • We compare the proposed approach with 9 competing approaches. • Evaluated on the real datasets from an E-commerce company and 3 benchmark datasets. • Proposed models achieved good results in forecasting accuracy. Sales volume forecasting is of great significance to E-commerce companies. Accurate sales forecasting enables managers to make reasonable resource allocation in advance. In this paper, we propose a novel approach based on Long Short-Term Memory with Particle Swam Optimization (LSTM-PSO) for sale forecasting in E-commerce companies. In the proposed approach, the number of hidden neurons in different LSTM layers, and the number of iterations for training are optimized by Particle Swam Optimization metaheuristic. In the experiments, we compare the proposed approach with 9 competing approaches. The effectiveness of the proposed approach is evaluated on the real datasets from an E-commerce company as well as on the publicly available benchmark datasets. In the experiments, neural network design, activation functions, methods of regularization, and the training method of neural network are also analyzed. Experiment results show that the proposed PSO-LSTM models achieved good results in forecasting accuracy.