A numerical study of the gas–liquid two-phase flow and mass transfer in a square microchannel with a T-junction is carried out in this work. Through numerical simulation methods, the flow patterns of bubble flow, slug flow and annular flow are determined. By proposing a new flow pattern conversion relationship with different media and different speeds, 100 sets of CO2-water flow patterns and 100 sets of CO2-ethanol flow patterns are obtained. The effects of surface tension on flow pattern, bubble length and liquid plug length are studied. The pressure distribution and pressure drop are analyzed, and mass transfer is obtained through slug flow simulation, and the influencing factors of gas–liquid mass transfer are studied. The results show that the effect of surface tension on the length of the bubble and the length of the liquid plug is completely opposite, the pressure distribution is stepped, and the pressure drop increases with the increase of the gas–liquid velocity. In addition, it was found that the volumetric mass transfer coefficients of the bubble cap and the liquid film gradually decreased with time, and eventually stabilized. The increase in bubble velocity accelerates the mass transfer rate, while the increase in unit cell length slows the mass transfer rate. However, the influence of film thickness and liquid film length on mass transfer varies with time.