Abstract Gas in micro- and nanoscale pores maintains the middle and later period production of shale gas wells; however, these pores are severely affected by fracturing fluid that prevents the outflow of pore gas and reduces the efficiency of gas flow. This study used an innovative method to analyze gas–water interaction in shale gas reservoirs during the fracturing and drainage process. Based on the theory of gas–water interaction and gas flooding experiments using nuclear magnetic resonance, the drainage mechanism of shale micro- and nanoscale pores was analyzed in detail. The results show that pore gas pressure and drainage resistance after the influence of imbibition can be predicted by the proposed model, which indicates that the fracturing fluid in seepage channels is only discharged so that gas can be extracted and the water retained in the larger pores is discharged first, followed by the water in the smaller pores.