Echinococcus granulosus (sensu lato), a cestode that is endemic in Egypt, causes cystic echinococcosis (CE), a significant but neglected zoonotic disease that is prevalent throughout the world. Infected hydatid cysts are classified as fertile or non-fertile based on the presence of protoscoleces; nevertheless, the mechanism of non-fertile CE cysts remains unknown. The study aimed to assess whether granzyme B (GrB) expression and CD4 + /CD8 + could be related to the induction of non-fertile CE cysts. A total of fifty-eight individuals diagnosed with visceral hydatid cysts were selected, and they were further divided according to cyst fertility into fertile and non-fertile. Immunohistochemistry for CD4, CD8, and GrB was done. According to the results, hydatid cysts are common in adults and have no gender preference. The same clinical and laboratory data were shared by patients with fertile and non-fertile cysts (p = 0.186). GrB expression was not impacted by the fibrous deposition inside the hydatid cyst wall (p = 0.85); however, GrB was significantly correlated with the inflammatory density (p = 0.005). GrB expression was also found to be significantly higher in non-fertile cysts (p = 0.04). GrB expression is positively correlated with CD4 and CD8 expression. In conclusion, the expression of GrB in hydatid cysts may exacerbate the inflammatory response and impede cyst fertility while not affecting the fibrous deposition in the cyst wall.