Pustular skin diseases, with pustular psoriasis (PP) being the prototype, are immune-mediated diseases characterized by the presence of multiple pustules, resulting from neutrophil accumulation in the layer of epidermis. Sterile skin pustular eruption, like PP, is also observed in 20–30% of patients with adult-onset immunodeficiency syndrome (AOID) and anti-interferon γ autoantibodies (IFN-γ), leading to challenges in classification and diagnosis. While the mechanism underlying this similar phenotype remains unknown, genetic factors in relation to the immune system are suspected of playing an important role. Here, the association between human leukocyte antigen (HLA) genes, which play essential roles in antigen presentation, contributing to immune response, and the presence of skin pustules in AOID and PP was revealed. HLA genotyping of 41 patients from multiple centers in Thailand who presented with multiple sterile skin pustules (17 AOID patients and 24 PP patients) was conducted using a next-generation-sequencing-based approach. In comparison to healthy controls, HLA-B*13:01 (OR = 3.825, 95%CI: 2.08–7.035), C*03:04 (OR = 3.665, 95%CI: 2.102–6.39), and DQB1*05:02 (OR = 2.134, 95%CI: 1.326–3.434) were significantly associated with the group of aforementioned conditions having sterile cutaneous pustules, suggesting a common genetic-related mechanism. We found that DPB1*05:01 (OR = 3.851, p = 0.008) and DRB1*15:02 (OR = 3.195, p = 0.033) have a significant association with pustular reaction in AOID patients, with PP patients used as a control. A variant in the DRB1 gene, rs17885482 (OR = 9.073, p = 0.005), was observed to be a risk factor for PP when using AOID patients who had pustular reactions as a control group. DPB1*05:01 and DRB1*15:02 alleles, as well as the rs17885482 variant in the DRB1 gene, were proposed as novel biomarkers to differentiate PP and AOID patients who first present with multiple sterile skin pustules without known documented underlying conditions.