The 22-year-old, who is currently at Under-21 Euro 2017 with his nation, has put pen to paper on a four-year deal, which takes him through to 2021.
"I'd like to thank Kaiserslautern for the last few years and wish them all the best for the coming season," the goalkeeper told the official Hamburg website.
"Now I'm looking forward to a new chapter in the Bundesliga with Hamburg and I hope we can achieve our aims together."
HSV sporting director Jens Todt added: "Julian is a young and very talented goalkeeper who showed his potential with Kaiserslautern last season.
"We've been observing him for a long time and are convinced of his qualities."
Pollersbeck made 31 outings for Kaiserslautern in the Bundesliga 2 last season, keeping 14 clean sheets and conceding just 27 goals.