In recent years, Software-Defined Networks (SDNs) have emerged as a revolutionary approach to network management, offering centralized control and enhanced flexibility. However, this centralized architecture also introduces new security challenges, particularly in detecting and mitigating botnet attacks. Botnets, which consist of compromised devices controlled by malicious actors, can cause significant damage by launching Distributed Denial of Service (DDoS) attacks and other forms of network disruptions. Traditional detection methods frequently fall short in handling the evolving complexity of botnet tactics. This paper presents a novel AI-driven approach for the detection and mitigation of botnet attacks in SDNs using Deep Learning (DL) and Grad-CAM (Gradient-weighted Class Activation Mapping). The proposed method leverages deep learning algorithms to detect botnet traffic patterns, while Grad-CAM is employed to visualize and interpret the decision-making process of the model, improving transparency and enabling better insights into attack behaviors. The integration of these technologies enhances the accuracy and interpretability of botnet detection, allowing for more efficient attack mitigation strategies. Experimental results demonstrate that the AI- driven system significantly outperforms traditional detection methods, providing a scalable, real-time solution for securing SDNs against evolving botnet threats.