Portugal had a glorious chance to take the lead in just the fifth minute when Bernardo Silva broke into the Switzerland box, but the attacker could not find a route past Yann Sommer in the Switzerland goal.
Switzerland scored a second on the 30-minute mark when Mehmedi collected a through-pass from Haris Seferovic before finding the top corner from the edge of the box.
Portugal's best chance of the first half came in the 37th minute when Raphael Guerreiro found time and space inside the Switzerland box, but his effort was blocked following a period of pinball inside the area.
The match did end on a sour note for Switzerland, however, with Arsenal midfielder Granit Xhaka given his marching orders in second-half stoppage time for picking up two yellow cards within the space of a minute.
Next up for Portugal is a home match against Andorra on October 7, while Switzerland will make the trip to Hungary on the same night.