Clarke had previously played under Grayson while he was Huddersfield boss.
"I needed to move on and take a new path in my career. I see this as a big challenge and a big club, and I can't wait to get started," Clarke told BBC Radio Lancashire.
"It was difficult [to leave Huddersfield] because I'd been there since I was eight, but it was something that I needed to come. Simon Grayson gets players wanting to play for him. As soon as I knew he was interested, I wanted to get in and get signed."
Clarke made just one appearance for Huddersfield last season, against Preston in the first round of the Capital One Cup.