The cytotoxic T lymphocyte-associated antigen-4 (CTLA4) gene, a member of the immunoglobulin superfamily, is crucial for maintaining immune homeostasis and preventing autoimmune diseases. Studies have shown that polymorphisms in the CTLA4 gene are linked to an increased risk of brucellosis in humans, but its association with brucellosis in goats remains unexplored. In this study, the tissue expression profile of CTLA4 in goats was investigated, and the correlation between InDel polymorphisms in the CTLA4 gene and susceptibility to brucellosis in goats was examined. The findings reveal the widespread expression of CTLA4 in goat tissues, particularly in the spleen and testes. The tested goat populations presented genotypes insertion/insertion (II), insertion/deletion (ID), and deletion/deletion (DD) at both the P1 and P2 loci, and an association analysis revealed significant differences in the distribution of genotypes and allele frequencies at the P1 and P2 loci of the CTLA4 gene between the Brucella goat case and the control groups (p < 0.05). Specifically, compared with the II genotype, the P1 and P2 loci were significantly associated with an elevated risk of brucellosis development in goats under both the codominant (ID/II) and dominant (ID + DD/II) models (P1, p = 0.042, p = 0.016; P2, p = 0.011, p = 0.014). Additionally, haplotype analysis indicated that haplotypes IP1DP2, DP1IP2, and DP1DP2 were significantly associated with an increased risk of brucellosis in goats compared to the reference haplotype IP1IP2 (p = 0.029, p = 0.012, p = 0.034). Importantly, the Lipopolysaccharide (LPS) stimulation of peripheral blood monocytes and/or macrophages from goats with the II, ID, and DD genotypes resulted in increased CTLA4 expression levels in the II genotype, leading to a robust LPS-induced inflammatory response. Through bioinformatic analysis, the observed effect of the InDel locus on Brucella pathogenesis risk in goats could be attributed to the differential binding of the transcription factors nuclear factor kappaB (NF-κB) and CCAAT/enhancer-binding protein α (C/EBPα). These findings offer potential insights for breeding strategies against brucellosis.