This study investigated the relationship between hospital exposures, intestinal microbiota, and subsequent risk of Clostridium difficile-associated disease (CDAD), with use of a nested case-control design. The study included 599 patients, hospitalized from September 2006 through May 2007 in Montreal, Quebec, from whom fecal samples were obtained within 72 h after admission; 25 developed CDAD, and 50 matched controls were selected for analysis. Nonsteroidal anti-inflammatory drugs and antibiotic use were associated with CDAD. Fecal specimens were evaluated by 16S ribosomal RNA microarray to characterize bacteria in the intestinal microbiota during the at-risk period. Probe intensities were higher for Firmicutes, Proteobacteria, and Actinobacteria in the patients with CDAD, compared with controls, whereas probe intensities for Bacteroidetes were lower. After epidemiologic factors were controlled for, only Bacteroidetes and Firmicutes remained significantly and independently associated with development of CDAD. Hospital exposures were associated with changes in the intestinal microbiota and risk of CDAD, and these changes were not driven exclusively by antimicrobial use.