It was Slovenia’s first win at a World Cup after their only previous appearance, in 2002, ended in three defeats.
They top Group C with three points, two ahead of England and the United States, who drew 1-1 in Rustenburg on Saturday.
The Algerians had been marginally the better side in a lacklustre encounter until then, with the bleach-blond Hassan Yebda bossing their midfield.
But they created few chances with their best opening having come as early as the third minute through a Nadir Belhadj free kick which Samir Handanovic tipped over the bar.
At the other end, Slovenia created little of note until just before the break when a rasping left foot strike from midfielder Valter Birsa forced an acrobatic save from Chaouchi.
Both teams appeared to struggle with the high-bouncing World Cup ball and time after time they over-hit their passes with the ball running harmlessly out of play.
England’s draw with the US in the group’s opening match also contained a goalkeeping error, with England’s Robert Green producing a howler to gift the Americans their equaliser.