  We study the relation between the quantum spin Hall effect(QSHE) and the
$\mathbb{Z}_2$ global gauge anomaly and discover that there exists an
one-to-one correspondence between them. By constructing a two dimensional
non-abelian gauge theory whose non-abelian gauge field is the Berry connection
induced by the Bloch wave function of the quantum spin Hall system, we prove
that if the quantum spin Hall system is topologically nontrivial, the
corresponding 2D gauge theory has a global gauge anomaly. We further generalize
our discussion of the zero modes of the Dirac operator which play a central
role in our analysis. We find that the classical "spin" Hall effect also
contains a $\mathbb{Z}_2$ topological invariant which is not noticed before as
far as we know.
