Bruno Gallo's impressive volley put Maritimo ahead at the break and while defender Raul collected a second yellow card in the 77th minute, Leonel Pontes' home side held on against Lopetegui's men to surprisingly continue their strong recent history against Porto.
Maritimo had beaten Porto in the corresponding fixture last season and, although they entered Sunday's match in 11th - 20 points behind the visitors - Pontes' team made it two wins in three meetings.
Gallo struck the winner in the 32nd minute when Porto failed to clear Edgar Costa's cross effectively - the ball fell to the midfielder and he volleyed past an onrushing defender and over goalkeeper Fabiano.
Porto wasted numerous chances - they had 17 shots to Maritimo's two - but even though Raul received his marching orders with 13 minutes remaining, Lopetegui's men could not find an equaliser.
The result saw Porto slump to their first defeat in the Portuguese top flight in five games and they could end the round nine points adrift of leaders Benfica, who visit 10th-placed Pacos de Ferreira on Monday.
Porto (40 points) also allowed Sporting (39) to move within touching distance, with Marco Silva's men bouncing back from their Taca da Liga exit on Wednesday to defeat Academica 1-0.
Joao Mario was the hero at the Estadio Jose Alvalade, nodding in a rebound in the 76th minute, after Junya Tanaka's initial header was saved by Academica goalkeeper Lee.
South Korean striker Suk Hyun-jun scored his first goal for Vitoria Setubal since moving from Nacional this month as his new club thumped Rio Ave 4-1.
But despite Suk's absence, Nacional also tasted victory, coming from behind twice to edge past Moreirense 3-2, with Lucas Joao scoring the winner in second-half stoppage time.
Boavista, who sit 13th, claimed their first win in three games, stunning fifth-placed Sporting Braga 1-0, while Estoril won by the same scoreline over Arouca.
Belenenses and Penafiel completed a scoreless draw.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.