A rigorous derivation of nonequilibrium entropy production via the path-integral formalism is presented. Entropy production is defined as the entropy change piled in a heat reservoir as a result of a nonequilibrium thermodynamic process. It is a central quantity by which various forms of the fluctuation theorem are obtained. The two kinds of the stochastic dynamics are investigated: the Langevin dynamics for an even-parity state and the Brownian motion of a single particle. Mathematical ambiguities in deriving the functional form of the entropy production, which depends on path in state space, are clarified by using a rigorous quantum mechanical approach.