The deal for the midfielder is worth a reported £7.7 million, as per Sky Sports.
The Gunners signed Vieira from Porto for £34 million in June 2022.
The 26-year-old makes the move permanent to Hamburg after spending the 2025/26 campaign on loan at the German club.
He impressed in Bundesliga, scoring seven times and providing five assists in 29 league appearances.
A club statement read: "Everyone at Arsenal would like to thank Fabio for his contribution to the club and wish him and his family every success for the future.
"The transfer is subject to the completion of regulatory processes."
