In recent years, with the introduction of the concept of the Internet of Things, a large number of terminals connected to the network, the pressure of network bandwidth is increasing. The bandwidth resources wasted by the traditional fixed access network architecture have attracted more and more attention of researchers. In order to meet the different needs of different users for service quality and improve the flexibility of network, network slicing technology arises at the right moment. Based on the slicing idea of the flexible time- and wavelength-division multiplexing passive optical network (TWDM-PON), a dynamic PON slice restructuring algorithm (DRA) is proposed in this paper. The proposed algorithm avoids the influence of previous slicing on subsequent slicing in the step-by-step slicing process, slices at the global level, and is less affected by the randomness of initialization. The simulation results show that the performance of DRA is about 10~30% higher than that of the dynamic optical network units (ONUs) grouping algorithm (DGA) and the dynamic ONU slicing algorithm (DONUSA) when there are 8 OLTs, and is about 30% higher than that of DGA and 10% higher than that of DONUSA when there are 16 OLTs. Therefore, the proposed DRA has more positive significance to relieve the traffic pressure in the increasingly tight bandwidth resources.