Hartley has been allowed to leave Bristol City halfway through his contract after failing to settle in England.
Dons boss Mark McGhee said: "A potential deal with Paul is at a well advanced stage. It is not concluded yet and things can always happen but we are working towards finalising a deal as quick as possible.
"We are very excited about that. He would be a big asset to us but we have to cross the line with it first."