One of the most important concerns of cloud service providers is balancing renewable and fossil energy consumption. On the other hand, the policy of organizations and governments is to reduce energy consumption and greenhouse gas emissions in cloud data centers. Recently, a lot of research has been conducted to optimize the Virtual Machine (VM) placement on physical machines to minimize energy consumption. Many previous studies have not considered the deadline and scheduling of IoT tasks. Therefore, the previous modelings are mainly not well-suited to the IoT environments where requests are time-constraint. Unfortunately, both the sub-problems of energy consumption minimization and scheduling fall into the category of NP-hard issues. In this study, we propose a multi-objective VM placement to joint minimizing energy costs and scheduling. After presenting a modified memetic algorithm, we compare its performance with baseline methods as well as state-of-the-art ones. The simulation results on the CloudSim platform show that the proposed method can reduce energy costs, carbon footprints, SLA violations, and the total response time of IoT requests.