In order to improve the neural network structure and setting method of parameters, based on the glowworm swarm optimization (GSO) and BP neural network (BPNN), an algorithm of BP neural network optimized glowworm swarm optimization (GSOBPNN) is proposed. In the algorithm, GSO is used to obtain better network initial threshold and weight so as to compensate the defect of connection weight and thresholds choosing of BPNN, thus BPNN can have faster convergence and greater learning ability. The efficiency of the proposed prediction method is tested by the simulation of the chaotic time series of tent mapping. The simulations results show that the proposed method has higher forecasting accuracy compared with the BPNN, so it is proved that the algorithm is feasible and effective in the chaotic time series.