With the construction of China’s ecological civilization and the proposal of carbon peaking and carbon neutrality goals, shore power has been vigorously developed as an important technology for the future green development of ports. However, China’s electricity is still mostly coal-fired, which produces many carbon emissions. Coupled with regional differences, shore power is by no means certain to lower carbon emissions compared with fuel throughout China. Considering the power energy structure in different regions, this paper establishes a carbon emission correlation model between fuel and shore power during ship berthing, calculates the feasibility and actual emission reduction effect of shore power in coastal ports, and studies the restriction condition of starting time for the use of shore power for ships attached to ports according to the national policy of mandatory use of shore power. The results show that only a small part of coastal provinces and cities are suitable for using shore power, and it is limited by the berthing time of the ship. However, this condition is not related to the size of ships but related to the proportion of power generation. Therefore, the government should develop shore power according to local conditions, and vigorously increase the proportion of clean energy, so that the shore power truly achieve zero carbon emissions.