John, 21, moves to the Imtech Arena after falling out of favour with Benfica, making just eight appearances for the Lisbon club this term.
The switch sees the former Twente man reunite with Hamburg coach Bert van Marwijk, who worked with John during his time in charge of the Netherlands national side.
Hamburg were dealt a huge blow last week with the news that forward Maximilian Beister will miss the rest of the campaign with a knee ligament injury.
Van Marwijk is confident that John will be able to fill the void left by the 23-year-old and boost a Hamburg side that sits 14th in the Bundesliga.
"I am familiar with Ola and assume that the player will be able to take us forward quickly," Van Marwijk told the club's official website.
John could make his debut for Hamburg when Van Marwijk's side host Schalke on January 26.
The club have also confirmed Ousaim Bouy, another Dutchman, is to undergo a medical on Saturday with a view to completing a loan move from Juventus.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.