A mobile ad hoc network (MANET) is a collection of mobile nodes that dynamically form a temporary network without using any existing network infrastructure. MANET selects a path with minimal number of intermediate nodes to reach the destination node. As the distance between each node increases, the quantity of transmission power increases. The power level of nodes affects the simplicity with which a route is constituted between a couple of nodes. This study utilizes the swarm intelligence technique through the artificial bee colony (ABC) algorithm to optimize the energy consumption in a dynamic source routing (DSR) protocol in MANET. The proposed algorithm is called bee DSR (BEEDSR). The ABC algorithm is used to identify the optimal path from the source to the destination to overcome energy problems. The performance of the BEEDSR algorithm is compared with DSR and bee-inspired protocols (BeeIP). The comparison was conducted based on average energy consumption, average throughput, average end-to-end delay, routing overhead, and packet delivery ratio performance metrics, varying the node speed and packet size. The BEEDSR algorithm is superior in performance than other protocols in terms of energy conservation and delay degradation relating to node speed and packet size.