Hartley, 32, has featured 74 times for the Robins since joining in 2019.
The former Manchester City FA Youth Cup winner kept 24 clean sheets in all competitions.
After suffering an injury during a 3-3 draw away at South Shields in December, the goalkeeper received confirmation that he had torn his Meniscus and MCL, ending his season early.
Despite his injury, Hartley has continued to provide assistance to the club in the interim period following Michael Clegg's departure.
Ashton United have thanked Hartley for his commitment to the club and wished him all of the best for the future.
Photo credit: Ashton United
Keep up-to-date with our exclusive email newsletters.
Subscribe