During the exploitation of deep coal resources, the gas hazard becomes increasingly significant, severely threatening the high-quality development of the coal industry and the occupational safety and health of miners. Coal seam water injection is underground coal mines' most commonly used dust control measure. Additionally, it is an effective method for preventing localized coal and gas outburst hazards. After injecting water into the coal seam, spontaneous imbibition causes the retained water in the fractures to migrate under capillary action and widely distribute the water within the coal seam, which enhances the wetting degree of the coal by water and the effectiveness of gas prevention. To reveal the migration characteristics of water in the coal during spontaneous imbibition and its impact on gas control, a self-developed gas-bearing coal spontaneous imbibition system was used to conduct isobaric water injection imbibition and gas desorption experiments on gas-bearing coal samples. The results showed that after the water was injected into the coal sample, it migrated from bottom to top under capillary action, resulting in three stages of abrupt, rapid, and gradual changes in the electrical resistivity of different layers of the coal sample over time. The migration distance of water increased with the imbibition time, but the rate of increase gradually decreased. The compaction load increase reduced the coal sample's average pore size, resulting in faster water migration speed. After imbibition, the water content decreased gradually from bottom to top along the axial direction and showed a non-uniform distribution in the radial direction. During imbibition, the water displaced gas within the coal sample, and the amount of gas displaced increased with the imbibition time. Increasing the amount of water injected and the coal sample compacted load can promote water migration within the coal, expanding the wetted area and displacing more gas. After imbibition, due to the displaced gas being released and the water-lock effect, the atmospheric gas desorption amount of the coal sample decreased with an increase in the amount of water injected, following a modified power function relationship. When the amount of water injected into the coal sample was low, increasing the water-injected amount could significantly reduce the gas desorption expansion energy of the coal sample. However, this trend became less apparent as the amount of water injected continued to increase. To improve the effectiveness of coal seam water injection in preventing gas outburst hazards, it is recommended to carry out water injection operations as early as possible to expand the wetted area of the coal seam and to add gas drainage holes to prevent increased coal body outburst tendencies due to local gas pressure rise in the coal seam.