With Milan not playing until Monday (AEDT), Inter took the chance to move to within two points of its city rival as it claimed a third straight league win.
Romelu Lukaku got the ball rolling with his 12th goal of the season in all competitions, before Marcelo Brozovic's sublime pass played in Hakimi for a second.
Emanuel Vignato's 67th-minute goal threatened to make things tense for Inter, but Hakimi's second – a fine finish at the culmination of a fantastic run infield – wrapped things up.
Inter's early dominance told 16 minutes in when, having initially missed his attempted volley from Ivan Perisic's cross, Lukaku reacted sharply to curl a finish into the top-left corner, with covering defender Danilo only able to help it in.
Lukaku should have doubled Inter's tally just after the half-hour, but a heavy touch allowed Lukasz Skorupski to make a brave stop.
Inter did get its second on the stroke of half-time, however, Hakimi cruising in behind Bologna's defence and coolly side-footing in his second Serie A goal after latching onto Brozovic's inch-perfect pass.
Another chance went begging for Lukaku after the restart, the Belgian just failing to sweep home after Alessandro Bastoni had flicked on Brozovic's cross.
Lukaku turned provider when he teed up Alexis Sanchez, but Skorupski once more stood firm in a one-on-one.
Bologna's goalkeeper rushed out to deny Lukaku again on the hour and Sinisa Mihajlovic's side – looking to win consecutive Serie A games against Inter for the first time since 1999 – made it count when Vignato lashed in from close range.
Yet the contest was all but settled three minutes later as Hakimi cut in on his left foot and drilled in a low finish that Skorupski failed to get enough on.