The former England C international, 24, was a key player in the club’s promotion campaign last term – and is the reigning National League North Player of the Year – and has carried on his impressive form into the current 2018-19 season.
Leesley has amassed 13 assists already this season during a rewarding time at the club which has seen him score 32 goals in 120 appearances since signing from Alfreton Town in the summer of 2016.
On Leesley’s new deal, Harrogate manager Simon Weaver said: “I think it is deserved.
“Joe has stepped up a level in terms of his performance this year and has done so at a new level in the National League.
“We get a lot from Joe on the pitch, and off the pitch, he is a great character who we are delighted to have secured for the long term.”
The CNG Stadium chief added: “We want to create a sense of belonging at the club and this shows how far the club has come in that we are now able to secure the future of players who we see here for the long term.
“We are confident in our judgement and that this can be a platform for Joe to continue his success at this club.”