Nartey, 23, who made three appearances for Stags last season during an injury-ravaged loan spell, was a free agent after being released by Burnley earlier this summer.
He could now make his competitive debut for the Ammies in Saturday's season-opener against the Stags.
“I've been here for a week and a half now so I've met the lads and after the first couple of days I knew I wanted to be here,” he said.