Harley signed for Albion in the summer of 2011 and scored on his debut against Peterborough.
But he struggled to force his way into the first team at the AMEX and was loaned out to MK Dons last season.
He has now completed a move to the County Ground and he told Swindon's official website he was looking forward to a new challenge.
"I'm delighted," he said. "The lads all seem really bubbly. It's a young squad - one of the youngest I've seen actually but that can be a good thing.
"I know three or four of the lads here that I've played with before. They seem a good bunch and team spirit looks really good. I'm looking forward to it.
"I've played a lot in League One. It's a tough league to get out of. Obviously Swindon came close last year and hopefully we can go one step further this year."