By making use of the background field method, we derive a novel reformulation of the Yang–Mills theory which was proposed recently by the author to derive quark confinement in QCD. This reformulation identifies the Yang–Mills theory with a deformation of a topological quantum field theory. The relevant background is given by the topologically nontrivial field configuration, especially, the topological soliton which can be identified with the magnetic monopole current in four dimensions. We argue that the gauge fixing term becomes dynamical and that the gluon mass generation takes place by a spontaneous breakdown of the hidden supersymmetry caused by the dimensional reduction. We also propose a numerical simulation to confirm the validity of the scheme we have proposed. Finally we point out that the gauge fixing part may have a geometric meaning from the viewpoint of global topology where the magnetic monopole solution represents the critical point of a Morse function in the space of field configurations.