In wireless sensor networks (WSNs), finding the best transmission route from each node to the mobile sink is not a simple task because of the dynamic characteristics of sink node and cluster transmission. In order to balance energy consumption and reduce collisions in wireless transmissions, this paper proposes a Dynamic Spanning Tree with Mobile Sink (DSTMS) routing algorithm. Firstly, based on the Low Energy Adaptive Clustering Hierarchy Protocol (LEACH), a multi-layer transmission framework with dynamic minimum spanning tree (MST) is constructed to optimize data transmission route. In this framework, the selected rendezvous points, according to the motion parameters of mobile sink, build the dynamic rendezvous layer to constraint the hierarchical transmission of DSTMS. In addition, considering some factors of transmission energy consumption and residual energy distribution,the weight factor based on energy efficient function is introduced to evaluate the cost of transmission path within the MST. Moreover, the proposed algorithm not only reduces network energy consumption caused by frequent location updates of mobile sink, but also reduces data transmission congestion by constructing dynamic hierarchical transmission strategy. The simulation results show that the DSTMS algorithm can effectively prolong the network life, balance the network load and reduce collisions in wireless transmissions.