We consider two-stage quadratic integer programs with stochastic right-hand sides, and present an equivalent reformulation using value functions. We first derive some basic properties of value functions of quadratic integer programs. We then propose a two-phase solution approach. The first phase constructs the value functions of quadratic integer programs in both stages. The second phase solves the reformulation using a global branch-and-bound algorithm. We also consider a level-set approach to reduce the search space in the second phase. We show that our method can solve instances whose extensive forms are hundreds of orders of magnitude larger than the largest quadratic integer programming instances solved in the literature.