Traffic management in software-defined networks (SDNs) is critical for efficient bandwidth utilization and resource provisioning. Recent works on SDN load balancing (LB) have focused on identifying and rerouting elephant flows (EFs) for effective bandwidth usage. These techniques have some limitations, such as using source-to-destination hop count as the primary rerouting metric and not differentiating the types of flow that result in frequent resource conflicts when handling EF with long-lived bandwidth. Besides, current EF detection techniques use predefined bandwidth-use thresholds that cannot adapt to the ever-changing traffic condition. Also, detecting EF on switches results in high controller-switch bandwidth and high EF detection time. This study presents an ant colony optimization-based technique for rerouting EFs while considering load-balancing in the SDN links. This technique, called DPLBAnt, is formulated as a shortest-path problem in SDN that can alleviate the high controller-switch load. The proposed technique first detects EF by using a pair of classifiers on both SDN controller and switches. Most EF candidates are sifted on the switches, resulting in accurate and efficient detection of EF. Then, DPLBAnt obtains the global state of the SDN from which the most optimal paths for congested links are retrieved, and EF are redirected accordingly. The performance of the proposed DPLBAnt has been extensively simulated. Results indicate its superior performance over Equal-Cost Multi-Path (ECMP) and FlowSeer techniques in terms of average end-to-end delay (54% and 7.9% better), average network throughput (3.5× and 1.5× better), and average packet loss (18% and 10% better) respectively. The overall performance indicates that the proposed LB technique based on detection and rerouting of EFs can improve SDN's overall performance.