The 29-year-old put pen to paper on a three-year deal with the Spireites having departed The County Ground on a free transfer.
Chief executive Chris Turner told the club's official website: "Gary is a quality signing - I don't think there's anybody outside the Premiership who's better on the left wing.
"The left-hand side has been unbalanced for a long time and the addition of Gary will further strengthen the firepower as he creates and scores goals.
"Paul Cook has patiently waited for the deal to be done as he has been very keen to bring Gary in. Chairman Dave Allen has provided some great support to ensure the conclusion of the deal."
Roberts spent one season with Swindon, scoring four times in 38 appearances.