Haller, who moved to Ajax Amsterdam last January after scoring 14 goals in 54 outings for the Hammers, converted a penalty on 20 minutes and later outpaced a defender and fired into the far corner of the net.
Moumi Ngamaleu pulled one goal back from another penalty, on 61 minutes, to set up a tense finish to the Group D showdown.
Ivory Coast top the table with four points after two rounds, Cameroon have three, and Mozambique one and Malawi none ahead of their match on Tuesday.
Group D is the only section of 10 in Africa featuring two countries among the 10 highest ranked in the continent — the Ivory Coast were 12th when the draw was made two years ago.
Meanwhile, South Africa edged Ghana 1-0 in Johannesburg through a 83rd-minute Bongokuhle Hlongwane goal and replaced them as Group G leaders.
Fielding a young, inexperienced side under recently hired Belgian coach Hugo Broos, the South Africans should have broken the deadlock earlier.
Percy Tau, who has quit English Premier League club Brighton to join Egyptian and African giants Al Ahly, had a first-half headed goal wrongly disallowed for offside.
Evidence Makgopa, one of many new faces after Broos complained about inheriting an “old” squad, missed a sitter just after half-time, poking the ball wide of an unguarded goal.
But with time running out and weakened Ghana looking like taking a point home, Hlongwane connected with a low cross and the ball rolled into the net via the far post.
Ghana lacked Premier League trio Daniel Amartey, Jordan Ayew and Jeffrey Schlupp as South Africa is on the British coronavirus “red list”, which requires travellers to isolate for 10 days when they return.
South Africa have four points and Ghana three from two matches, and Zimbabwe one and Ethiopia none ahead of their meeting in Bahir Dar on Tuesday.
Mali, who are seeking a first World Cup appearance, took a firm grip on Group E by forcing a 0-0 draw away to 10-man Uganda.
Defender Murushid Juuko was shown a straight red card on 65 minutes and Uganda had to settle for another goalless stalemate, after holding Kenya last week.
Benin failed to build on a matchday 1 win in Madagascar and had to come from behind to draw 1-1 with Group J rivals the Democratic Republic of Congo in Cotonou.
Both goals were headed by senior players during the opening half with Dieumerci Mbokani, 35, putting the Congolese in front and Jordan Adeoti, 32, levelling.
Benin have four points and DR Congo two, while Tanzania, who have one, and pointless Madagascar face off in Dar es Salaam on Tuesday.
Niger equalled their record for the number of goal scored in a World Cup qualifier by coming from behind to trounce Djibouti 4-2 in Group A with Victorien Adebayor bagging a brace.
Djibouti are ranked 182nd in the world, making them the lowest of the 40 African World Cup hopefuls, and have conceded 12 goals in two outings.
The section is set to be dominated by African champions Algeria and Burkina Faso, both matchday 1 winners who clash on Tuesday in Morocco because the Burkinabe lack an international-standard stadium.
Djibouti, who have also created a base in Morocco, and Burkina Faso are among nine countries forced to use neutral venues either because the stadium facilities or the pitch are not up to scratch.
The Central African Republic and Liberia are other nations forced to play home matches abroad and they met in the Cameroonian port city of Douala, where Liberian Kpah Sherman scored the only goal.