The 23-year-old heads to League Two Walsall after four years at Mill Farm.
A former England C international, Hardy bagged 16 goals in 44 appearances for Dave Challinor's men, helping them to last season's Promotion Final at Wembley.
Hardy will join up with his new side once his current contract expires on July 1.
"I’m buzzing to be here," Hardy told his new club's website. “It’s a really big club with great fans. It is a great stadium and I am really looking forward to getting started. I can’t wait.
“I met the manager on Friday and everything he said sounded really positive. Once I had spoken to him, I wanted to get it sorted as quickly as possible - I want to excite the fans.”
AFC Fylde won't have long to wait before next season's fixtures are released. The full list will be out on Wednesday July 3.