Youngster Elliot Lee???s first goal for the club sent the Premier League side through despite seeing striker Diafra Sakho sent off in the first half with the match goalless.
Slaven Bilic???s side will now face Maltese outfit Birkirkara in the second round on 16 and 23 July following their 3-1 aggregate win over Ulisses.
It was Bilic???s first match in the dugout for the Hammers after sitting in the stands for the 3-0 first-leg win at Upton Park last week, and it got off to an undisciplined start.
Striker Sakho, who scored twice in last Thursday???s win, was dismissed after an off-the-ball incident with two Lusitans players near the centre circle, despite the Frenchman???s bemusement at the decision.
But West Ham were one up shortly after on 22 minutes, 20-year-old former Luton loanee Lee opening his body up before finishing inside the area after good work from Matt Jarvis and Reece Oxford.
West Ham were cheered on by around 500 fans in Andorra, but the travelling support witnessed a poor second half in picturesque surroundings, with neither side creating much.
Late on in the second period, James Tomkins had to clear off the line after Alfi Conteh flicked on a corner, after Lee nearly grabbed his second of the game with a curling effort at the other end.
West Ham are looking to reach the Europa League first round for the first time since the 2006/07 season.