Understanding the genetic and molecular bases of the ability to distinguish self from nonself (allorecognition) and mechanisms underlying evolution of allorecognition systems is an important endeavor for understanding cases where it becomes dysfunctional, such as in autoimmune disorders. In filamentous fungi, allorecognition can result in vegetative or heterokaryon incompatibility, which is a type of programmed cell death that occurs following fusion of genetically different cells. Allorecognition is genetically controlled by het loci, with coexpression of any combination of incompatible alleles triggering vegetative incompatibility. Herein, we identified, characterized, and inferred the evolutionary history of candidate het loci in the filamentous fungus Neurospora crassa. As characterized het loci encode proteins carrying an HET domain, we annotated HET domain genes in 25 isolates from a natural population along with the N. crassa reference genome using resequencing data. Because allorecognition systems can be affected by frequency-dependent selection favoring rare alleles (i.e., balancing selection), we mined resequencing data for HET domain loci whose alleles displayed elevated levels of variability, excess of intermediate frequency alleles, and deep gene genealogies. From these analyses, 34 HET domain loci were identified as likely to be under balancing selection. Using transformation, incompatibility assays and genetic analyses, we determined that one of these candidates functioned as a het locus (het-e). The het-e locus has three divergent allelic groups that showed signatures of positive selection, intra- and intergroup recombination, and trans-species polymorphism. Our findings represent a compelling case of balancing selection functioning on multiple alleles across multiple loci potentially involved in allorecognition.