Microbes play key roles in various biogeochemical processes, including carbon (C) and nitrogen (N) cycling. However, changes of microbial community at the functional gene level by livestock grazing, which is a global land-use activity, remain unclear. Here we use a functional gene array, GeoChip 4.0, to examine the effects of free livestock grazing on the microbial community at an experimental site of Tibet, a region known to be very sensitive to anthropogenic perturbation and global warming. Our results showed that grazing changed microbial community functional structure, in addition to aboveground vegetation and soil geochemical properties. Further statistical tests showed that microbial community functional structures were closely correlated with environmental variables, and variations in microbial community functional structures were mainly controlled by aboveground vegetation, soil C/N ratio, and NH4+-N. In-depth examination of N cycling genes showed that abundances of N mineralization and nitrification genes were increased at grazed sites, but denitrification and N-reduction genes were decreased, suggesting that functional potentials of relevant bioprocesses were changed. Meanwhile, abundances of genes involved in methane cycling, C fixation, and degradation were decreased, which might be caused by vegetation removal and hence decrease in litter accumulation at grazed sites. In contrast, abundances of virulence, stress, and antibiotics resistance genes were increased because of the presence of livestock. In conclusion, these results indicated that soil microbial community functional structure was very sensitive to the impact of livestock grazing and revealed microbial functional potentials in regulating soil N and C cycling, supporting the necessity to include microbial components in evaluating the consequence of land-use and/or climate changes.