The capacitated vehicle routing problem (CVRP) is one of the combinatorial optimization problems with the most widespread applications in practice. Because of the intrinsic computational complexity, the approximate algorithms are commonly employed to solve the CVRP rather than the exact algorithms. In this research, the artificial bee colony algorithm (ABC), derived from the swarm intelligence, is adapted to handle the CVRP. The application of the ABC algorithm in solving the CVRP exploited the inherent features of the swarm intelligence. More importantly, a routing directed ABC algorithm (RABC) is further proposed consisting of numerous improvements in order to enhance the capability of the diversified search and intensified search of the conventional ABC algorithm, which incorporates the useful information from the routing as well. The RABC algorithm is examined with different benchmark test instances. The experimental results show that the RABC algorithm excels the conventional ABC algorithm significantly. Moreover, the application of the RABC algorithm in solving the CVRP can provide practical insights for the implementation of swarm intelligence in solving other combinatorial optimization problems.