The establishment of enterprise target inventory is directly related to the forecast of drug sales volume. Accurate sales forecasting can help businesses not only set accurate target inventory but also avoid inventory backlogs and shortages. In this paper, NN technology is used to forecast sales and is optimized using the PSO algorithm, resulting in the creation of a drug sale forecast model. The model optimizes the weights and thresholds of NN using the improved PSO optimization algorithm and predicts the periodic components based on time correlation characteristics, effectively describing the trend growth and seasonal fluctuations of sales forecast data. Furthermore, the model in this paper has been creatively improved according to the needs of practical application, which has improved the shortcomings of traditional NN, such as long training time, slow convergence speed, and ease to fall into local minima, to improve performance and quality, and has received positive results in application. The experimental results show that this model has a prediction accuracy of 96.14 percent, which is 12.78 percent higher than the traditional BP model. The optimized model can be used to forecast drug sales in a practical and feasible way.