With the goal of achieving carbon neutrality in the shipping industry, the issue of sustainable port development is becoming more and more valued by the port authorities. The shipping industry requires more effective carbon emission reduction analysis frameworks. This paper takes China’s Shanghai Port as the research object and analyzes it from the perspective of port-integrated logistics. Combined with the port data of Shanghai Port from 2008 to 2022, the principal component analysis gray correlation analysis model was used to screen the factors affecting the port’s carbon emissions, and three calculation models for Shanghai Port’s carbon emission sources were proposed. In addition, an expanded stochastic impact model based on the regression of population, affluence, and technology (STIRPAT) was constructed for the influencing factors of Shanghai Port’s carbon dioxide emissions and combined with the method of ridge regression to further identify important influencing factors. At the same time, a gray neural network model was established to predict the carbon emissions of Shanghai Port from 2021 to 2030 and compare them with their real value. The conclusion shows that there is a close relationship between Shanghai Port carbon emissions and container throughput, throughput energy consumption, number of berths, total foreign trade import and export, and net profit attributable to the parent company. Gray neural network model data calculations show that the growth rate of Shanghai Port’s carbon emissions will gradually slow down in the next ten years until the carbon peak is completed around 2033. The study can provide a reference for the sustainable development of other ports.