For the sensing layer of the Internet of Things, the mobile wireless sensor network has problems such as limited energy of the sensor nodes, unbalanced energy consumption, unreliability, and long transmission delay in the data collection process. It is proved by mathematical derivation and theory that this is a typical multiobjective optimization problem. In this paper, the optimization goal is to minimize the energy consumption and improve the reliability under time-delay constraints and propose a path optimization mechanism to optimize the mobile Sink of mobile wireless sensor networks based on the improved dragonfly optimization algorithm. The algorithm takes full advantage of the abundant storage space, sufficient energy, and strong computing power of the mobile Sink to ensure network connectivity and improve network communication efficiency. Through simulation comparison and analysis, compared with random movement method, artificial bee colony algorithm, and basic dragonfly optimization algorithm, the energy consumption of the network is reduced, the lifespan of the network is increased, and the connectivity and transmission delay of the network are improved. The proposed algorithm balances the energy consumption of the sensors nodes to meet the network service quality and improve the reliability of the network.