One of the most important challenges in theoretical physics is investigating the theory of quantum gravity. In this work, according to generalized uncertainty principle, we study the statistical aspects of diatomic gases. The generalized statistical quantities of the diatomic gases such as partition function, mean energy, entropy and specific heat at constant volume are obtained. Note that, in the limit α→0, all of modified statistical characteristics of diatomic gases become the usual forms. Also, the effect of linear and quadratic GUP (LQGUP) on the partition function and mean energy of diatomic gases is investigated.