According to French publication Nice-Matin, the transfer fee has not been disclosed, with the Germany side now expected to negotiate personal terms with the 27-year-old before completing the deal.
Hamburg have been monitoring Moffi for several weeks as they seek to strengthen their attack.
The striker spent the second half of last season on loan at Portuguese champions FC Porto, scoring once in nine league appearances.
Porto decided against a permanent deal after Nice maintained an €8 million asking price. Moffi joined Nice permanently in 2023 after initially arriving from Lorient on loan.
He endured a difficult campaign last season, including an incident involving Nice supporters.
Overall, he has scored 24 goals in 72 appearances for the French club across all competitions.
