BhGLM is an R package. This package provides functions for setting up and fitting Bayesian hierarchical GLMs, for numerically and graphically displaying the results, and for genetic association studies and QTL mapping. The Bayesian hierarchical GLMs include many models as special cases, e.g., classical GLMs, ridge regression, Bayesian lasso, and various adaptive lasso. These methods can be used not only for general data analysis but also for high-dimensional and correlated data. The functions are particularly useful for complicated genetic data analysis, for example, QTL mapping in experimental crosses, genetic association studies for rare and common variants, prediction of complex diseases and traits, gene-set and pathway analysis, and gene-gene and gene-environment interactions.