High-density 3D warehousing is the future cornerstone of modern logistics storage. It aims to efficiently manage and store various types of goods by utilizing 3D space and automation technology. The accurate and fast docking algorithm of the four-way shuttles, as a core method of carrying the goods in high-density 3D warehousing, has become an increasingly important technical challenge. Inaccurate docking will result in a failure to change direction, while long docking time will affect the operation efficiency of the four-way shuttle. To overcome these obstacles, this paper presents an accurate and rapid docking algorithm for four-way shuttles. Firstly, the deceleration and jerk of a four-way shuttle in the braking stage are initialized according to the motion parameter set calculated by the docking motion model. Then, the four-way shuttle starts to move until the stop signal has been detected. If the system fails to detect the stop signal, the distance compensation is needed to ensure that the four-way shuttle can arrive at the stop point. Finally, the four-way shuttle stops immediately by way of amplifying the deceleration when reaching the stop point. The result shows that the accuracy of rapid docking is superior to that of direct docking. Compared with crawling docking, rapid docking reduces the braking time by 3.99s and stops at a speed lower than the crawling speed. The rapid docking algorithm not only enhances the throughput of high-density 3D warehousing but also improves the service life of four-way shuttles.