The intestinal microbiota plays an important role in the pathogenesis of inflammatory bowel disease (IBD), and geographical and genetic backgrounds impact the composition of the intestinal microbiota. However, there is a lack of evidence regarding the overall changes and characteristics of fecal-associated microbiota (FAM) and mucosa-associated microbiota (MAM) in Chinese patients with IBD. We recruited 26 patients with Crohn’s disease (CD), 46 patients with ulcerative colitis (UC), and 21 healthy individuals; we collected matched fresh fecal and mucosal samples from the same subjects. The microbial communities were studied by 454-pyrosequencing. Community-wide changes in FAM and MAM were observed in patients with IBD. The proportion of several butyrate-producing bacteria, such as of the genera Roseburia, Coprococcus, and Ruminococcus were significantly reduced, whereas the pathogens Escherichia-Shigella and Enterococcus were prevalent in patients with IBD. FAM and MAM were similar between CD and UC. FAM differed from MAM in healthy individuals and patients with UC. In conclusion, the compositions of FAM and MAM were altered in patients with IBD. The reduction of butyrate-producing bacteria and the increase in opportunistic pathogens might be associated with the pathogenesis of IBD.