The 24-year-old spent two months on loan at Pride Park from Watford last season.
Derby manager Nigel Clough told the club's official website: "Craig did extremely well when he was on loan with us and he made a real impact. His performances at left-back were excellent and we were really pleased with him, and we've had our sights set on him permanently for quite a while now.
"We have been aware of him for quite some time, even before he joined us on loan, and we're delighted he sees Derby County as his home for the next few years.
"He's capable of playing in defence or midfield, but we see him as our first-choice left-back now and think he'll only get better in that position as well."
Forsyth made 10 appearances for Derby last campaign.