BACKGROUND: There is a lack of predictive markers informing on the risk of colitis in patients treated with immune checkpoint inhibitors (ICIs). The aim of this study was to identify potential factors associated with development of ICI colitis. METHODS: We performed a retrospective analysis of melanoma patients at Dana-Farber Cancer Institute who received PD-1, CTLA-4, or combination ICIs between May 2011 to October 2017. Clinical and laboratory characteristics associated with pathologically confirmed ICI colitis were evaluated using multivariable logistic regression analyses. External confirmation was performed on an independent cohort from Massachusetts General Hospital. RESULTS: The discovery cohort included 213 patients of whom 37 developed ICI colitis (17%). Vitamin D use was recorded in 66/213 patients (31%) before starting ICIs. In multivariable regression analysis, vitamin D use conferred significantly reduced odds of developing ICI colitis (OR 0.35, 95% CI 0.1-0.9). These results were also demonstrated in the confirmatory cohort (OR 0.46, 95% CI 0.2-0.9) of 169 patients of whom 49 developed ICI colitis (29%). Pre-treatment neutrophil-to-lymphocyte ratio (NLR) ≥5 predicted reduced odds of colitis (OR 0.34, 95% CI 0.1-0.9) only in the discovery cohort. CONCLUSIONS: This is the first study to report that among patients treated with ICIs, vitamin D intake is associated with reduced risk for ICI colitis. This finding is consistent with prior reports of prophylactic use of vitamin D in ulcerative colitis and graft-versus-host-disease. This observation should be validated prospectively in future studies.