Artificial Intelligence (AI) technology is changing the industrial paradigm and has been widely adopted in port operations. Although AI technology can improve the efficiency of port operations and service quality, ports need to bear some costs. Discussing the role of applying AI technology to ports in complex competitive environments has become an important issue in the operations of ports and shipping. In this study, we construct a game-theoretic model of competitive heterogeneous ports. The research conclusions indicate that the adoption of AI technology by heterogeneous ports can enhance port profits. Unfortunately, simultaneous adoption exacerbates homogenized competition, posing a threat to profit realization. Furthermore, while the hub port can leverage AI-empowered capabilities to strengthen own competitiveness, it can undermine the performance of competitors and society at large. Surprisingly, the adoption of AI technology by feeder port is more advantageous in achieving social welfare and achieving multiple benefits such as carbon reduction.