Quantum annealing is a generic solver of classical optimization problems that makes full use of quantum fluctuations. We consider work statistics given by a repetition of quantum annealing processes by employing the Jarzynski equality proposed in nonequilibrium statistical physics. In particular, we analyze a nonequilibrium average of the exponentiated work performed by a transverse field. A special symmetry, gauge symmetry, leads to a non-trivial relationship between quantum annealing toward different targets in the theory of spin glasses. We believe that our results will be a step toward an alternative realization of efficient quantum computation as well as our better understanding of nonequilibrium behavior of systems under quantum control.