Petr Jiracek headed the hosts in front just before half-time with Pierre-Michel Lasogga adding a second for a side which had lost their last eight games in all competitions before Slomka replaced Bert van Marwijk this week.
Dortmund seemed distracted by their upcoming Champions League clash with Zenit St Petersburg as they showed little resistance at the HSV-Arena, and they conceded a third when Hakan Calhanoglu scored with a free-kick from over 40 yards out.
Slomka has only been in charge for five days, but it was evident he had done something to alter the mental state of his players.
Rather than being the nervous side seen over the past month, they exuded confidence with Jiracek going close to giving them the lead.
That effort lifted the fans, who played their part by getting behind the team, who responded with more shots on Roman Weidenfeller's goal.
They took the lead three minutes before half time when Lasogga shielded the ball to the goal line before crossing to the far post, where Jiracek rose to beat Pierre-Emerick Aubameyang and head beyond the reach of Weidenfeller.
It was a similar story in the second half, even if Dortmund coach Jurgen Klopp tried to boost his side's attack by sending on Marco Reus.
Lasogga doubled the home side's lead in the 58th minute when he was put through on goal by Calhanoglu and comfortably slotted the ball past Weidenfeller.
The ball was in the back of the net again minutes later when Johan Djourou headed in from a corner, but play had already been halted for a foul.
Dortmund substitute Marvin Ducksch went close to opening the game back up with a volley which was too close to Rene Adler, who then made a fine save to push Lukasz Piszczek's header onto the crossbar.
Marco Reus flashed a shot over the crossbar as Dortmund tried to mount a recovery, but their efforts led to nothing and it was Hamburg who ended the game with an even wider grin as Calhanoglo lifted a 40-yard free-kick past Weidenfeller when nobody was expecting a shot from the Turkish midfielder.