In this paper, an artificial neural network (ANN)-based dynamic weighted combination model trained by novel particle swarm optimization (PSO) algorithm is proposed for software reliability prediction. Different software reliability growth models (SRGMs) are merged based on the weights derived by the learning algorithm of the proposed ANN. To avoid trapping in local minima during training of the ANN, we propose a neighborhood-based adaptive PSO (NAPSO) algorithm for learning of the proposed ANN in order to find global optimal weights. We conduct the experiments on real software failure data sets for validation of the proposed dynamic weighted combination model (PDWCM). Fitting performance and predictability of the proposed PSO-based neural network are compared with the conventional PSO-based neural network (CPSO) and existing ANN-based software reliability models. We also compare the performance of the proposed PSO algorithm with the CPSO algorithm through learning of the proposed ANN. Empirical results indicate that the proposed PSO and CPSO-based neural network present fairly accurate fitting and prediction capability than the other existing ANN-based software reliability models. Moreover, the proposed PSO-based neural network is most promising for the purpose of software fault prediction since it shows comparatively better fitting and prediction performance results than the other models. © 2017 World Scientific Publishing Company.