Firstly, a smart terminal is designed based on 5G communication technology, which is embedded with various protection measurement devices to form a 5G smart terminal. A distributed control model for the distribution network is constructed based on 5G smart terminals, and an objective function is designed taking into account factors such as restoring important loads, surplus power supply in the distribution network, network losses, and the number of switch actions. Finally, the Sparrow Search Algorithm (SSA) is improved using elite reverse learning strategy and dynamic sine perturbation strategy, and it is used to solve the objective function. Based on the IEEE33 distribution network node system, experimental tests are conducted, and the results show that the average delay of 5G smart terminals is about 30ms. Taking 14:00 as an example, the proposed method achieves network loss, number of switch actions, recovered important load power, and power supply surplus of 46.39 kW, 3 times, 185.65 kW, 240.28 kW, respectively. The fault recovery effect of the distribution network is ideal.