The major histocompatibility complex (MHC) is a multi-copy immune gene family in vertebrates. Its genes are highly variable and code for antigen-presenting molecules. Characterization of MHC genes in different species and investigating the mechanisms that shape MHC diversity is an important goal in understanding the evolution of biological diversity. Here we developed a next-generation sequencing (NGS) protocol to genotype the MHC class I genes of 326 Godlewski’s buntings (Emberiza godlewskii) sampled in the Western mountain area of Beijing from 2014 to 2016. A total of 184 functional alleles were identified, including both non-classical and classical alleles, clustering into nine supertypes. Compared with other passerine birds, the number of MHC class I alleles per individual in Godlewski’s buntings is high (mean 16.1 ± 3.3, median 16). In addition, we demonstrated signatures of historical and contemporary selection on MHC genes. Reflecting historical selection, ten amino acid sites in the antigen-binding domain showed signatures of balancing selection, eight of which exhibit high amino acid polymorphism. In terms of contemporary selection, we found that specific MHC supertypes were nominally associated with the infection of two malaria parasite lineages. These findings indicate the action of historical and possibly also contemporary balancing selection and suggest negative frequency-dependent or fluctuating selection as possible selection mechanisms.