Accurate and early diagnosis of kidney cancer is critical for effective treatment and improved patient outcomes, yet current methods often face challenges in precision and reliability. This research addresses these challenges by integrating Ant Colony Optimization (ACO) with advanced deep learning models—DenseNet, ResNet 50, and VGG 19—and Long Short-Term Memory (LSTM) networks to enhance the prediction and classification of kidney cancer from CT scans and medical records. The approach leverages ACO to optimise feature selection, improving the performance of these deep learning models. DenseNet, combined with ACO and LSTM, achieved the highest accuracy of 97.9%, demonstrating exceptional capability in accurately detecting and classifying kidney cancer. Res-Net 50, also optimised by ACO, followed with a notable accuracy of 96.2%, showing its robustness. VGG 19, despite substantial improvement over training epochs, attained a lower accuracy of 92.3%, indicating that further optimisation could be beneficial.