Port infrastructure is an important guarantee to support the development of shipping trade and a main link to connect shipping routes, where its construction and expansion promote economic progress whereas exacerbating regional pollution. Based on the panel data of 18 above-scale coastal ports in China from 2005 to 2020, the spatial characteristics and correlation of sulfur-oxide (SOX) concentrations are first analyzed, then the spatial Durbin model (SDM) is established to evaluate the extent of port infrastructure's impact on the concentrations, further the intermediation effects of three dimensions on the concentrations are explored. From the outcome, the influences of port infrastructures on the SOX concentrations are from decreasing the SOX concentrations through improving the operational efficiencies and increasing the SOX concentrations by adding the operational equipment, which also shows significant spatial spillover effects. In addition, the mechanical dimension as a mediation makes the trade dimension have an indirect effect on the SOX concentrations. This paper employs a spatial econometric model to analyze panel data from 18 coastal ports and ports of higher tiers in China, spanning from 2005 to 2020. It uncovers the intricate mechanism by which port infrastructure influences SOX concentration, thus providing a scientific foundation and decision support for environmental protection and sustainable port development.