The present study demonstrates the pivotal role of inflammation and defense responses in anaphylaxis and STEMI, uncovers five hub genes (IL1R2, FOS, MMP9, DUSP1, CLEC4D) closely correlated with immune effector cells of anaphylaxis and STEMI, and identifies two effective diagnostic markers (DUSP1and CLEC4D), which deepens our understanding of the pathogenesis of anaphylaxis complicated with STEMI and provides potential blood diagnostic biomarkers and therapeutic targets for this complication. Here, FOS is linked to anaphylaxis.