Inter conceded three goals in the second half, including one in the third and final minute of stoppage time, as it lost for the fourth time in five games in Group K.
Sparta Prague, which defeated Southampton 1-0 at home, secured first place in the group with 12 points, five more than both Hapoel and Southampton, which meet in England in the final round. Inter stayed on three points.
Mauro Icardi scored his sixth goal in as many games for Inter in the 13th and Marcelo Brozovic added to the lead in the 25th and Inter looked home and dry.
But not this Inter side, who fold like a pack of cards whenever the pressure is turned on them. The turning spot here came in the 69th minute when goalkeeper Samir Handanovic was sent off for a foul that prompted Hapoel’s equalizer from a penalty kick.
Striker Ben Sahar netted the late winner with a shot from inside the area after a fast breakaway that caught Inter’s defense off guard.
The Israeli champions had beaten Inter 2-0 at San Siro in the teams’ group opener. That made Hapoel Beer-Sheva the first side to ever beat Inter in both legs of a European tie.
The defeat meant that Inter have managed one draw in their last 7 away games played between Serie A and the Europa League.