To predict and prevent the collapse and mud inrush caused by the deep karst trough in tunnels, an engineering case is studied. Firstly, a comprehensive identification method for the hazard-causing structure of the deep karst trough in tunnels is proposed and successfully applied. Secondly, the morphological characteristics and developmental mechanism of the deep karst trough are studied. The hazard-causing structure is mainly developed at the entrance section of the karst tunnel, which is funnel-shaped, mostly filled with clay and a small amount of gravel. The development scale is affected by the geological structure, tectonic movement, formation lithology and inclination, sunshine and precipitation, and surface soil. Thirdly, four hazard-causing modes of the collapse and mud inrush are proposed, i.e., rock mass failure of tunnel face, direct exposure of tunnel face, direct exposure of tunnel roof, and rock mass failure of tunnel roof. Finally, a treatment technology for collapse and mud inrush is put forward. The treatment technology is to “remove the mud, fill the karst cave, conduct advance grouting, strengthen the support, waterproof the collapse area, backfill the collapse pit.” The collapse and mud inrush of Qiyueshan Tunnel was successfully treated by using the above technology.