Green computing focuses on the energy consumption to minimize costs and adverse environmental impacts in data centers. Improving the utilization of host computers is one of the main green cloud computing strategies to reduce energy consumption, but the high utilization of the host CPU can affect user experience, reduce the quality of service, and even lead to service-level agreement (SLA) violations. In addition, the ant colony algorithm performs well in finding suitable computing resources in unknown networks. In this paper, an energy-saving virtual machine placement method (UE-ACO) is proposed based on the improved ant colony algorithm to reduce the energy consumption and satisfy users’ experience, which achieves the balance between energy consumption and user experience in data centers. We improve the pheromone and heuristic factors of the traditional ant colony algorithm, which can guarantee that the improved algorithm can jump out of the local optimum and enter the global optimal, avoiding the premature maturity of the algorithm. Experimental results show that compared to the traditional ant colony algorithm, min-min algorithm, and round-robin algorithm, the proposed algorithm UE-ACO can save up to 20%, 24%, and 30% of energy consumption while satisfying user experience.