In the context of competition between two ports in Cournot, we studied optimal decision-making processes for the government and the port in four different situations before and after the integration of the port based on the subsidy and carbon tax mechanism. We analyzed the impacts of the carbon tax rate and emission reduction subsidy rate on social welfare and determined the optimal carbon tax rate, the optimal emission reduction subsidy rate, the optimal carbon emission level, and the optimal social welfare level in different situations. We also compared the optimal social welfare level and the optimal carbon emission level of the four situations before and after the integration. This research can be used as a policy reference for the government for the formation of environmental policies based on the goal of maximizing social welfare, and it could also be used for the port’s internal decision-making when the environmental policy has been set.