Ship energy management has an effect both on cost efficiency and the environment due to the huge amount of CO2 emission caused by ship activities. Meanwhile, research regarding efforts to save energy consumption in the container terminal area is scarce. This paper aims to estimate CO2 emissions from ship activities in the container port. The influential variable of CO2 emissions is in consideration to Ship Energy Efficiency Management Plan (SEEMP). The estimation of C02 emission starts from the ship activities when the ship approaches the port, which includes ship maneuvering and ship berthing. Ship's energy consumption and CO2 emission were analyzed using random forest regression (RF) at the default setting, and then the effectiveness was verified using k-folds cross-validation. The analysis result showed there are five influential variables to reduce the CO2 emission: (1) main engine power; (2) auxiliary engine power; (3) waiting time in a port basin; (4) maneuvering time; and (5) berthing time. Among those five variables, maneuvering, waiting in a port basin, and berthing have the same position at the top with the same amount of weight importance from the four attribute selection training results. The random forest model training and k-folds cross-validation confirmed that the model has 98.85% of accuracy. Finally, a fuel-efficient operation is discussed, and it can be concluded that by combining several voyage optimizations with a skilled operator and cold ironing when available, it is possible to reduce the CO2 emission by 20%. The findings and proposed plan in this paper can become a reference to develop Ship Energy Efficiency Management Plan.