The striker will join the Hamburg-based club in the summer for free, with his contract expiring at the end of the season.
Bouhaddouz has agreed a three-year deal at the Millerntor Stadion, taking him through to 2019.
A necessary addition
With Ante Budimir's loan to Crotone being made permanent and Lennart Thy heading off to Werder Bremen in the summer, St. Pauli needed reinforcements up front.
John Verhoek will also be joining 1. FC Heidenheim in the summer, which would have left Nico Empen and Fabrice-Jean Picault as Ewald Lienen's only forwards.
Even then Picault's future at the club isn't sure, as his deal ends in the summer. It does, however, look like his brace against Bochum will earn him a long-term contract.
Bouhaddouz brings form with him to St. Pauli, having scored nine goals and contributed a further six to his team-mates.
The 29-year-old may be advancing in years but this has been his most prolific season in the 2. Bundesliga, which should bode well for both parties.
Meggle, Lienen and Bouhaddouz have their say
"Aziz is an experienced, prolific and physically strong striker who can help us with his ball security," Lienen said. He also praised his "heading ability and finishing".
Thomas Meggle was pleased Bouhaddouz "picked St. Pauli ahead of other offers" and that the club "were able to convince one of the 2. Bundesliga's leading scorers" to join.
Bouhaddouz himself said it was "an easy decision" and that he looks forward to working with "a good and experienced manager" in Lienen.
The player, who was also speaking to the club website, said the talks went "very well" and that the "positivity and sporting concept" convinced him to join.