Starting from the Dirac equation in external electromagnetic and torsion fields we derive a path integral representation for the corresponding propagator. An effective action, which appears in the representation, is interpreted as a pseudoclassical action for a spinning particle. It is just a generalization of Berezin-Marinov action to the background under consideration. Pseudoclassical equations of motion in the nonrelativistic limit reproduce exactly the classical limit of the Pauli quantum mechanics in the same case. Quantization of the action appears to be nontrivial due to an ordering problem, which needs to be solved to construct operators of first-class constraints, and to select the physical sector. Finally the quantization reproduces the Dirac equation in the given background and, thus, justifies the interpretation of the action.