Differential protection has excellent selectivity and quick motion, which is suitable for distribution network protection scenarios of multi-source networks. Aiming at the problem of 5G differential protection communication delay and excessive delay jitter, a differential protection method of distribution network based on 5G and particle swarm algorithm is proposed. The principle of differential protection and the synchronization scheme of 5G differential protection are introduced, and the 5G timing technology is selected to realize the synchronization of 5G differential protection. The hazards and solutions of 5G network communication delay and delay jitter are analyzed, and the network slicing technology, optimization of upstream scheduling, optimization of bit error rate and air interface retransmission, optimization of transmission priority and other methods are introduced to reduce communication delay and delay jitter, and the improved particle swarm algorithm is used to optimize parameters. Simulation examples show that the differential protection method of distribution network based on 5G and particle swarm algorithm can effectively limit communication delay and delay jitter, and can reliably operate in scenarios such as single-phase grounding fault, two-phase short-circuit fault and three-phase short-circuit fault.