We study experimentally the resistive behaviors of a niobium nitride superconducting hot-electron bolometer (HEB) device driven by magnetic field and terahertz radiation. We find that the resistance of the superconducting HEB device emerges due to time-dependent changes of the macroscopic quantum phase by flux-flow events. The flux-flow resistance is found to be increased linearly with magnetic field at low vortex velocities and is enhanced by terahertz radiation. At high vortex velocities, there is an obvious non-linear change, which can be well interpreted by viscous flux-flow instability predicted by the Larkin and Ovchinnikov theory. In addition, we demonstrate a technique taking use of the device resistance dependence on magnetic field to stabilize the superconducting HEB device.