Defeat to Fernando Santos' side follows a woeful reverse against Israel on Thursday and means that McLeish has now lost six of his eight games in charge since taking the top job for the second time in February.
After a largely even opening period, Portugal – who made 10 changes from the side that beat Poland 3-2 on Thursday – took the lead in the 43rd minute, Wolves striker Costa turning home Kevin Rodrigues' low cross from close range.
After a tepid opening, Scotland almost took a fortuitous lead after 14 minutes. James Forrest's deflected cross caused havoc in the Portugal penalty area and only a smart save from Beto prevented Sergio Oliveria's wayward header from finding his own net.
At the other end, Bruma flashed an effort agonisingly wide of Craig Gordon's left-hand post midway through the first half as the visitors belatedly woke from their slumber.
Portugal's more positive approach was rewarded two minutes before the interval when Costa stole in ahead of Andrew Robertson to prod home from six yards.
Scotland should have pulled level shortly after the restart, but an unmarked Scott McKenna inexplicably headed wide from John McGinn's corner.
They were made to pay for that miss in the 74th minute when Eder met substitute Renato Sanches' lofted free-kick to head past Gordon.
Bruma added a third six minutes from time, cutting in from the left and firing into Gordon's far post, but Hearts striker Naismith had the final say, curling in after latching onto Gary Mackay-Steven's pass.
What does it mean: McLeish's woes continue
Things have not gone to plan for McLeish since his return to the Scotland hot seat. They were second best to Portugal's second string and serious questions will now be asked of the former Rangers and Birmingham boss. Portugal, meanwhile, look in rude health and can toast a third win on the spin.
Costa makes his mark
He has yet to find the net for Wolves in the Premier League so far this season, but the 24-year-old made no mistake with his first international goal, showing superb hunger to nip ahead of Robertson for Portugal’s opener.
McKenna's miss proves costly
The Aberdeen man could have given Scotland the platform to go on and get a result from the game had he buried his header shortly after the restart. As it was, it flashed wide and Portugal clinically punished the young defender.
Key Opta facts:
- After going seven games without defeat between March and October 2017 (W4 D3), Scotland have since lost seven of their last nine games in all competitions (W2).
- Portugal have won each of their last three internationals, as many as they had in their previous 11 games before this run (D6 L2).
- Scotland are winless in their last six games against Portugal in all competitions (D2 L4), scoring just two goals in total across these meetings.
- Scotland have kept a clean sheet in just two of their eight games since Alex McLeish returned as manager (13 goals conceded in total).
- Steven Naismith has scored in each of his last two appearances for Scotland at Hampden Park, having also netted against Albania last month.
- Helder Costa's opener was his first goal for Portugal, on what was his first senior appearance for the national team.
Both sides resume their Nations League campaigns on November 17. Scotland travel to Albania, while Portugal will visit Italy.