The constitutive models of shape memory hydrogels (SMHs) are gaining increasing interest due to their important applications in human tissue, artificial skin, and drug release because these models can elucidate the interaction between water molecule diffusion and transient network deformation, and clarify the mechanism of shape memory effect. Herein, based on the chain statistic theory, a micro-macroscopic SMH constitutive model is developed, which simultaneously considers solvent diffusion and network evolution. Compared with existing models, our model considers the coupling effect of water molecule diffusion and dynamic network deformation, kinetics of dynamic bond controlled by temperature, chemical potential and chain force, and can capture the location-dependent shape memory effect of SMHs. In addition, this model is implemented into ABAQUS through a user material subroutine (UMAT) and the simulation results are in reasonable agreement with experimental measurements. Three simulation examples, the constrained swelling of a strip, deformation of a flat plate with a hole and SMH indentation, are presented and simulation results indicate that our model can capture the location-dependent shape memory behaviors. This work provides a powerful tool to elucidate complex mechanical behaviors of SMHs and may guide their structure designs and applications.