The 30-year-old will join the Terriers on July 1 from Leicester City after agreeing terms on a three-year deal at the John Smith’s Stadium.
Hamer spent four years at the KP Stadium and will provide competition for Jonas Lössl and Joel Coleman following the recent departure of former England international Rob Green.
“Ben’s arrival adds more quality to our already strong goalkeeping department under Paul Clements,” said Wagner, fresh from signing his own new deal at Huddersfield.
“He is well known to Paul and also played with our first-team coach Andrew Hughes at Charlton Athletic. Both have given him glowing references as a goalkeeper and as a person, which is very important to us.
“I have spoken with Ben and he arrives here wanting to play Premier League football, which is great for us all. Jonas Lössl had a fantastic first season at the club and this further competition will bring even more out of everyone, which is ideal for me and the team.”
Hamer will arrive in Huddersfield with more than 300 career appearances to his name.
The lion’s share of those came at Charlton Athletic, who he helped to the League One title when former Town chief Chris Powell was in charge.
He did, though, also play 80 times for Brentford in three different loan spells when at first club Reading.
Last season, Hamer made 11 appearances for Leicester City. The last four of these came in April when Kasper Schmeichel was out injured.
Town’s capture of their first signing came at the end of a week that saw Wagner commit his future to the club along with Hughes and assistant manager Christoph Buhler.
The trio all had 12 months remaining on their existing deals but are now contracted until 2021. Wagner had been linked with a host of jobs, including Leicester City.