With the advent of the 5G communication era, the communication demand between different regions has risen significantly, so the importance of base station construction has been increasing. Current communication facilities can not meet the growing needs of remote communication, it is necessary to build high-quality 5G base stations to meet the requirements of 5G technology. In the process of 5G base station construction, 5G base station location decision and optimization are of great significance. Therefore, this paper proposes a 5G base station location decision and optimization method based on the particle swarm optimization algorithm. In view of the difficulty of implementing meta-heuristic calculation due to the huge amount of factor transmission in the construction of 5G base stations, as well as the situation of 5G associated transmission, the optimization model of 5G base station location decision is built with comprehensive consideration of coverage objectives and communication quality objectives. By initializing particle swarm, evaluating fitness, updating individual optimal and group optimal solutions, adjusting speed and position, and iterative optimization, the particle swarm optimization algorithm obtains the optimization result of 5G base station location decision. The experimental results show that this method can effectively optimize the location decision of 5G base stations, and can be widely used in the field of 5G base station location decision, so as to promote the further development of modern communication technology.