In this work, we fabricated a high-performance and biocompatible porous triboelectric nanogenerator (TENG) with friction layers made by silk fibroin (SF)@MXene composite aerogel (SF@MXene-A) and a PDMS sponge. The incorporation of MXene into the SF aerogel increases the specific surface area as well as the resulting surface charge density, providing a way for designing a high-performance aerogel TENG. The TENG with the biocompatible SF aerogel achieves an optimum output performance at a ratio of MXene to SF of about 1:1, obtaining a maximum open-circuit voltage (Voc) of 545 V and maximum short-circuit current (Isc) of 16.13 μA. The Voc of our SF@MXene-A based TENG is about 2–3 times larger than the reported best values of other aerogel-based TENGs. In addition, owing to the recognized biocompatibility and advantageous air permeability of the SF@MXene-A, we designed a bioporous TENG mask that diagnoses asthma symptoms. The SF@MXene-A based TENGs have potential applications as wearable devices for diagnosing breath-relevant diseases.