The objective of this study was to evaluate the effects of different SDF to IDF ratios on growth performance, serum indexes and fecal microbial community in pigs. Weaned and growing-finishing pigs were fed a diet containing five different ratios of SDF to IDF from 1:5 to 1:9 and from 1:3 to 1:7, respectively. Results showed a linear tendency that average daily gain (ADG) of weaned pigs decreased but the feed intake to weight gain ratio (F/G) increased as the ratio of SDF to IDF increased from 1:5 to 1:9 (p = 0.06). The ADG of growing-finishing pigs showed quadratic changes (p < 0.05) as ratios of SDF to IDF increased from 1:3 to 1:7. The Shannon index of fecal microbial diversity increased first and then decreased as the SDF to IDF ratio increased from 1:5 to 1:9 (p < 0.05). The Shannon and Chao indexes of fecal microbial diversity in growing-finishing pigs showed significant incremental linearly as the SDF to IDF ratio increased from 1:3 to 1:7 (p < 0.05). In conclusion, the recommended inclusion ratios of SDF to IDF in weaned and growing-finishing pigs diets are 1:7 and 1:5.