We examine a 2DOF Hamiltonian system, which arises in study of first-order mean motion resonance in spatial circular restricted three-body problem "star-planet-asteroid", and point out some mechanisms of chaos generation. Phase variables of the considered system are subdivided into fast and slow ones: one of the fast variables can be interpreted as resonant angle, while the slow variables are parameters characterizing the shape and orientation of the asteroid's orbit. Averaging over the fast motion is applied to obtain evolution equations which describe the long-term behavior of the slow variables. These equations allowed us to provide a comprehensive classification of the slow variables' evolution paths. The bifurcation diagram showing changes in the topological structure of the phase portraits is constructed and bifurcation values of Hamiltonian are calculated. Finally, we study properties of the chaos emerging in the system.