Rams boss Billy Davies has been chasing Griffin for some time and he has now finally landed his man.
Portsmouth were willing to let the 28-year-old move on as he was well down the pecking order at Fratton Park.
The news is a blow to Stoke who had hoped to sign Griffin after a successful loan spell at the Britannia Stadium last season.
"Andy is an excellent player, calm head and has a very good attitude," Davies told Derby's official website.
"Like Andy Todd he brings experience to the squad.
"I believe Andy has great years ahead of him. Every time I see him play he shows how consistent he is.
"We're very pleased to have him on board."