The 24-year-old joins from fellow League One side Bristol City after making 21 appearances for the Robins since January 2013.
Kelly, who plays in central midfield, played with manager Lee Johnson at Kilmarnock as they won the Scottish League Cup in 2012.
The midfielder earned his first full international cap in Scotland's 2-1 victory over Luxembourg in 2012. The youngster has also represented his country at under-18 and under-21 level.
Kelly is the fourth player to join the club this summer following the signings of Joseph Mills, Mike Jones and Brian Wilson.