Depu, a striker who previously played for Gil Vicente, scored twice in the 19th and 39th minutes for the 'Palancas Negras', who also scored with Zini in the 74th minute and Alem in the 86th minute.
Madagascar's only goal was scored in injury time, in the 90+2 minute, by Mica Razaimahatana.
In an attempt to retain the title of the competition that brings together teams from the south of the African continent, Angola will face the winner of the match between South Africa and the Comoros Islands.
The final of the competition is scheduled for Sunday at 2 pm.
Angola's opponent will be announced later this Friday. The other semi-final, scheduled for 5 pm, will be played between South Africa and the Comoros.