Veteran striker Mike Baraza scored the only goal of the game 12 minutes after half-time.
The Harambee Stars will play Zanzibar in Thursday’s semi-finals of the east and central African regional event.
Hosts and defending champions Uganda take on Ethiopia in the last of the quarter-finals, the winners will face Tanzania in the last four.
Malawi’s preparations for the game were hit by a player strike on Monday.
The squad refused to train in a protest over unpaid allowances for the trip.