Cloud Computing (CC) involves extensive data centers with numerous computing nodes that consume significant electrical energy. Researchers have identified high service-level agreement (SLA) violations and excessive energy consumption (EC) as major challenges in CC. Traditional approaches often focus on reducing EC but tend to overlook SLA violations, particularly when selecting Virtual Machines (VMs) from overloaded hosts. To address these issues, this paper introduces the Enhanced Ant Colony Optimization (EACO) algorithm, aims to reduce high EC and SLA violations by utilizing a unique approach where the best-performing ant explores movement patterns and identifies distances between movements. The algorithm comprises three key steps: tracking pheromone trails, updating pheromones and selecting the cities (VMs). The effectiveness of EACO was validated through simulations using CloudSim. Compared to existing techniques, EACO demonstrated a significant reduction in EC, achieving approximately 41-44% lower energy consumption than the traditional Ant Colony Optimization (ACO) algorithm when applied to Planet Lab data. This suggests that EACO offers a more efficient and stable solution for managing EC and SLA violations in cloud environments.