The origin of the driving force on quantum vortices in superconductors has long been discussed. We investigate the origin of this force using the momentum flux tensor $\mathsc{P}$, Maxwell stress tensor $\mathsc{T}$, and numerical solutions for a flowing rectilinear vortex in the time-dependent Ginzburg-Landau (TDGL) theory for three-dimensional superconductors with finite Ginzburg-Landau parameter $\ensuremath{\kappa}$ and the Maxwell equations. We calculate the hydrodynamic force ${\mathbit{F}}_{\mathrm{hydro}}(C)$ and magnetic Lorentz force ${\mathbit{F}}_{\mathrm{mag}}(C)$ respectively using the contour integral of $\mathsc{P}$ and $\mathsc{T}$ along a closed path that winds around the vortex line. The calculations show that neither ${\mathbit{F}}_{\mathrm{hydro}}(C)$ nor ${\mathbit{F}}_{\mathrm{mag}}(C)$ reaches the full magnitude of the driving force. However, when the path $C$ is farther than the penetration depth from the vortex line and hence the energy dissipation is negligible on $C$, the sum of the two forces becomes independent of the choice of $C$ and accounts for the full magnitude of the driving force on the vortex. We demonstrate the applicability of this result to a flowing vortex described in the generalized or modified version of the TDGL equation and to a pinned vortex. We then discuss the driving force on the Pearl vortex in two-dimensional superconductors and a curved vortex line in three-dimensional superconductors. We propose an experiment that locally probes the magnetic field with a pinned vortex to verify our results that the contribution of the magnetic pressure (Lorentz force) to the total driving force on the vortex is less than half.