In this work, a viscoplastic fast Fourier transform (FFT)-based code is combined with a continuum dislocation dynamics (CDD) framework to analyze the mechanical behavior of polycrystalline MgAZ31 material under unidirectional tensile test. A crystal plasticity formulation including the size effects through a stress/strain gradient theory, dislocation density flux among neighboring grains and grain boundary back stress field is implemented into the CDD and coupled with VPFFT for this purpose. Then, an electron backscatter diffraction-based orientation image microscopy of a sample microstructure is applied as an input to the code. The model predicts, among other things, distributions of stress, strain, mobile dislocation density, geometrically necessary dislocation and stress–strain behavior. The numerical findings are compared with experimental results, and the micromechanical behavior of the polycrystal is discussed regarding dislocation density evaluation in different stages of strain hardening.