The 22-year-old was linked with a number of clubs throughout Europe, including West Ham, Fulham, Norwich, Tottenham and Reading.
French side Sochaux and Italian side Genoa have also been linked with the Azerbaijan-born winger.
Hamad will officially join Hoffenheim in January.
“Hamad is a young, ambitious and still developing player who has shown his qualities in Sweden,” said Hoffenheim sports director Alexander Rosen.