Stroke is one of the main threats to the public health worldwide. Metformin, an anti-diabetic drug, is an activator of AMP-activated protein kinase (AMPK). Metformin plays an important role on improving behavior in neurodegenerative diseases through diverse pathways. In the current study we aimed to investigate the probable effects of metformin on anxiety and autophagy pathway in global cerebral ischemia. Rats were divided into seven groups; Sham, ischemia (I/R), metformin (met), compound c (CC), CC+ischemia, met+ischemia, met+CC+ischemia. Metformin was pretreated for 2 weeks and CC administrated half an hour before global cerebral ischemia. Blood glucose, body weight, sensorimotor scores, elevated plus maze and open field test were evaluated after ischemia. Autophagy related factors were measured by Western blot and immunofluorescent assay in hippocampus of rats. Based on our results, pretreatment of rats by metformin improved sensory motor signs, anxiolytic behavior and locomotion in ischemic rats. CC injection in I/R rats attenuated the therapeutic effects of metformin. Autophagy factors such as light chain 3B, Atg7, Atg5-12 and beclin-1 decreased in ischemic rats compared to the sham group (P < 0.001 in all proteins). Level of autophagic factors increased in metformin pretreated rats compared to global cerebral ischemia (P < 0.001 in all proteins). These data indicated that the beneficial role of metformin in behavior and autophagy flux mediates via AMPK. Our results recommended that metformin therapy could improve psychological disorders and movement disability following I/R and profound understanding of AMPK-dependent autophagy would enhance its development as a promising target for intracellular pathway.