Background:Considering contradictory reports about the impact of dietary pattern on CD4 cell count in previous studies and the potential importance of diet on the immune system, this study aimed to assess the association between dietary patterns and CD4 count among HIV-infected patients.Methods:This cross-sectional study was conducted among HIV-infected patients aged 18–60 who registered in the referral Voluntary Counseling and Testing Center of Shiraz, Iran. The principal component analysis identified nutritional patterns and factors. The association between the score of the dietary patterns and CD4 count was considered in two categories of CD4 more/less than 500 and using backward logistic regression after adjusting for confounders.Results:A total of 226 participants were included in the analysis. CD4 was significantly lower in males ( p < 0.001). Participants with illegal drug use ( p < 0.001), HCV ( p = 0.001), and HBV ( p < 0.001) had lower serum CD4. Four extracted dietary patterns were a Plant-rich diet, Healthy animal-based proteins, a Western diet, and Affordable calorie and protein patterns. There was an association between CD4 and Western diet patterns in the best model in which age, gender, weight, and HBV were included. Each unit increase in Western diet score increased the odds of CD4 less than 500 by 57% (OR = 1.57; CI 95% 1.06–2.34, p = 0.02).Conclusion:Among the four dietary patterns, the Western diet comprising a high intake of refined sugar and grain, saturated and trans fats, and animal protein sources, especially high-fat red meat, had a statistically significant relationship with a decrease in CD4 cell count.