When employing hydraulic processes to increase gas drainage efficiency in underground coal mines, coal seams become a three-phase medium, containing water intruding into the coal pores with the inherent occurrence of gas. This can change the stress state of the coal and cause instability. This work studied the mechanical properties of coal containing water and gas and derived an appropriate failure criterion. Based on mixture theory of unsaturated porous media, the effective stress of coal, considering the interaction of water and gas, was analyzed, and the failure criterion established by combining this with the Mohr-Coulomb criterion. By introducing the stress factor of matrix suction and using fitted curves of experimentally determined matrix suction and moisture content, the relationships between coal strength, gas pressure, and moisture content were determined. To verify the established strength theory, a series of triaxial compression strength tests of coal containing water and gas were carried out on samples taken from the Songzao, Pingdingshan, and Tashan mines in China. The experimental results correlated well with the theoretical predictions. The results showed a linear decrease in the peak strength of coal with increasing gas pressure and an exponential reduction in peak strength with increasing moisture content. The strength theory of coal containing water and gas can become an important part of multiphase medium damage theory.