In deep coal mines, a coal seam usually contains high gas pressure and is subjected to static and dynamic loading due to mining-induced stress and sudden fracture of hard roof. In this study, two experimental equipment of gas-containing coal under static and dynamic loading was developed for the investigation of the static and dynamic mechanical properties of coal under various gas pressures. The first one was gas-solid coupling equipment with quasi-static loading developed on the basis of the RMT-150 testing machine. The other one was coupled gas-dynamic loading equipment modified from a split Hopkinson pressure bar. By using the modified equipment, the static and dynamic compressive strengths of coal were tested under four gas pressures, namely, 0, 0.5, 1.0, and 1.5 MPa, respectively. Results show that gas pressure clearly affects the stress-strain curve and strength of coal. As the initial gas pressure increases from 0 MPa to 1.5 MPa, the static strength decreases from 23.95 MPa to 13.28 MPa, and the dynamic strength also decreases from 41.78 MPa to 32.21 MPa. The failure strain of the specimen decreases from 0.90 to 0.51 under the static loading and increases from 0.56 to 0.74 under the dynamic loading. Meanwhile, the average dynamic increase factor (DIF) of compressive strength increases from 1.78 to 2.34 as the initial gas pressure increases. However, the gas influence factor (GIF) of compressive strength decreases from 1.00 to 0.77. The phenomena suggest that the mechanical property of coal under static loading is more sensitive to gas pressure than under dynamic loading, indicating the prominent influence of the loading mode on the failure mode of gas-containing coal. Hence, the results can provide an experimental basis for studies of the mechanisms of coal and gas outburst in deep coal mines.