4H-SiC has recently attracted attention as a new power semiconductor material to replace silicon. One of the challenges impeding its practical use is the elimination of killer defects in its epitaxial layer, such as dislocations and stacking faults. The conversion of basal plane dislocations (BPDs) into threading edge dislocations (TEDs) is crucial for reducing harmful mobile dislocations. However, the atomistic mechanism underlying the process remains elusive. To clarify the BPD–TED conversion mechanism, we developed a charge-transfer interatomic potential to reproduce 30° partial dislocation dynamics in the surface vicinity of 4H-SiC. The proposed potential significantly improved the accuracy of estimating the stacking fault energy and dislocation mobility in the regions where the dislocation core and surface overlap. Using the developed potential, we investigated the mechanism underlying the contraction of a pair of 30° partial dislocations in the vicinity of the surface. From the energy landscape, the equilibrium distance between the two partials decreased as the depth from the surface decreased because of the strong image force near the surface. The equilibrium distance decreased to zero when the depth reached 0.25 nm. This result is qualitatively consistent with the dislocation theory and the known effect of image force. From the viewpoint of the activation energies of kink nucleation and migrations, the activation energy for C-core and Si-core partial contractions decreased below a depth of 1 nm from the C-face and S-face surfaces, respectively, and became almost equal to that of C-core and Si-core expansions, respectively, when the depth reached 0.25 nm. Therefore, the partial BPDs can contract easily in the corresponding structures, particularly when the depth from the surface is less than 1 nm.