Ronaldo missed a whole host of chances throughout the clash in Leiria, which was decided by a first-half strike from Marcelinho on what was his international debut for Bulgaria.
As for Bulgaria, Spartak Moscow attacker Ivelin Popov skippered the team on his 59th international appearance, while Brazilian-born Marcelinho made his international debut from the onset.
It took less than one minute for Ronaldo to have an attempt on goal, but his low strike from a wide angle was kept out by the diving Stoyanov, before the Bulgarian stopper kept out a close-range effort from Nani.
Bulgaria just could not get out of their own half in the early moments and Ronaldo tested Stoyanov twice more from inside the box, before Nani had another try from distance as the onslaught continued.
Ronaldo had an even better chance in the 10th minute after a low cross from Nani was parried into his path, but the Real Madrid attacker incredibly fired over from close range as it remained 0-0. Pepe also came close for Portugal in the 17th minute when he met a corner from the right, but his header dropped just wide of the post.
It was Bulgaria that took the lead against the run of play in the 19th minute though when Marcelinho wriggled free of Pepe inside the Portugal box before poking his effort into the bottom corner of the net.
Stoyanov's busy opening 27 minutes continued when he had to keep out a powerful free kick from Ronaldo, before Joao Mario just missed the target for the home side six minutes later.
Nani missed Portugal's best chance of the first period when he somehow deflected an Adrien Silva cross over the crossbar in the 36th minute, but down the other end, Pepe had to produce a stunning piece of defending to prevent Dimitar Rangelov from tapping home at the far post for 2-0.
The home side headed down the tunnel at the interval having had 20 attempts, but trailing to Marcelinho's effort, which came during one of Bulgaria's rare ventures forward.
Mihail Aleksandrov had the first clear chance of the second half after a smart pass from Popov, but the No.7 fired his effort over the crossbar from inside the Portugal box.
Down the other end, Stoyanov was again forced to keep out a free kick from Ronaldo, before Alves fired the rebound over the crossbar as Bulgaria somehow hung on to their 1-0 lead.
Portugal were awarded a penalty in the 66th minute when Nikolay Bodurov was adjudged to have handled a Pepe cross inside the box, but Ronaldo again found Stoyanov in excellent form, before the attacker fired the rebound wide of the post.
Nani had another glorious chance 10 minutes from time after a low cross from Eliseu, but the former Manchester United attacker missed his second excellent opportunity of the night as Bulgaria held out to record the win.
Portugal will continue their preparation for Euro 2016 with a friendly against Belgium next Tuesday, while Bulgaria will travel to Macedonia for a friendly on the same night.