With the rapid development of China’s social economy and the improvement of the level of urbanization, urban transportation has also been greatly developed. With the booming development of the internet and the sharing economy industry, shared bicycles have emerged as the times requirement. Shared bicycles are a new type of urban transportation without piles. As a green way of travel, shared bicycles have the advantages of convenience, fashion, green, and environmental protection. However, many problems have also arisen in the use of shared bicycles, such as man-made damage to the vehicle, the expiration of the service life of the vehicle, etc. These problems are unavoidable, and the occurrence of these failure problems will also cause serious harm to the use of shared bicycles. This article aims to study the path optimization of shared bicycles considering the recovery of faulty vehicles during dispatching. Based on the K-means spatial data clustering algorithm, a path optimization experiment of shared bicycle recycling scheduling considering the recycling of faulty vehicles is carried out. The experiment concluded that the shared bicycle recycling scheduling path based on K-means clustering planning significantly reduces the total time spent and the total cost of performing recycling scheduling tasks. Among them, the unit price of recycling and dispatching of each faulty shared bicycle has dropped by 4.1 yuan compared with the market unit price. The conclusion shows that the shared bicycle recycling scheduling path considering faulty vehicle recycling based on K-means clustering algorithm has been greatly optimized.