Lafferty scored 10 goals in 30 Premiership games for the Edinburgh club in 2017-18 and featured heavily for them this season until his departure was announced on Wednesday.
Rangers’ interest in bringing him back to Glasgow emerged last month when they reportedly had a £200,000 bid rejected for him. The Northern Ireland international hinted he was keen to return to Rangers two weeks ago, saying it was "up to the two clubs to work something out".
And Hearts owner Ann Budge suggested the club were reluctant to let him go before striking a deal for an undisclosed fee.
“It is no secret that this has been a particularly difficult and drawn-out affair," she said.
“While we have no desire to sell our players to other teams in the league, when a player has his mind fully set on moving, it is difficult to reach an alternative conclusion."
Lafferty made over 130 appearances for Rangers in his first spell and won three league titles, two League Cups and the Scottish Cup.
He could make his debut for them in the Europa League qualifier against Ufa on Thursday, as clubs are allowed two wildcard additions to their squad before the game.