Heart transplantation is the gold standard for treating patients with advanced heart failure. Although improvements in immunosuppressive therapies have significantly reduced the frequency of cardiac graft rejection, the incidences of T cell-mediated rejection (TCMR) and antibody-mediated rejection remain almost unchanged. A four-archetype analysis (4AA) model, developed by Philip F. Halloran, illustrated this problem well. It provided a new dimension to improve the accuracy of diagnoses and an independent system for recalibrating the histology guidelines. However, this model was based on the invasive method of endocardial biopsy, which undoubtedly increased the postoperative risk of heart transplant patients. Currently, little is known regarding the associated genes and specific functions of the different phenotypes. We performed bioinformatics analysis (using machine-learning methods and the WGCNA algorithm) to screen for hub-specific genes related to different phenotypes, based Gene Expression Omnibus accession number GSE124897. More immune cell infiltration was observed with the ABMR, TCMR, and injury phenotypes than with the stable phenotype. Hub-specific genes for each of the four archetypes were verified successfully using an external test set (accession number GSE2596). Logistic-regression models based on TCMR-specific hub genes and common hub genes were constructed with accurate diagnostic utility (area under the curve > 0.95). RELA, NFKB1, and SOX14 were identified as transcription factors important for TCMR/injury phenotypes and common genes, respectively. Additionally, 11 Food and Drug Administration-approved drugs were chosen from the DrugBank Database for each four-archetype model. Tyrosine kinase inhibitors may be a promising new option for transplant rejection treatment. KRAS signaling in cardiac transplant rejection is worth further investigation. Our results showed that heart transplant rejection subtypes can be accurately diagnosed by detecting expression of the corresponding specific genes, thereby enabling precise treatment or medication.