Moldova's Albot superbly took hold of the match and posed plenty of problems for the 20-time Grand Slam winning legend, who took a while to get adjusted to the new surroundings at the Hard Rock Stadium.
But the Swiss star's class and experience eventually shone through as he booked a round of 32 match with Serbian Filip Krajinovic who surprised three-time Grand Slam winner Stan Wawrinka 5-7, 6-2, 7-6 (7/5) earlier in the afternoon.
"I definitely think Radu played a great match, it was really tough and I struggled early on," admitted Federer, a three time Miami Open champion.
"I am very relieved and happy to make it through. It was a great atmosphere."
Moldovan Albot, 29, is enjoying a rich vein of form and arrived in Miami at a career high ranking.
He had never played the Swiss legend before but wasted little time in breaking Federer's serve in the very first game before holding for 2-0.
He was anything but overawed by facing Federer and it was no surprise to see him wrap up the first set and leave the world number five with plenty of work to do.
Federer missed a break point opportunity at 4-3, Albot then crashing home a winner to heap the pressure back onto the 37-year-old before brilliantly sealing the first set.
The pro-Federer crowd were stunned, but the Swiss upped his game in the second, hitting 15 winners and five aces as well as saving a break point to keep carefree Albot at bay and take an entertaining tussle into a third set.
Federer managed to keep the pressure on and cracked the Moldovan who was serving at 3-4.
After a brilliant one handed backhand down the line from Federer clipped the line, Albot hit long once more and that gave Federer the break and opportunity to serve out for the match and move into the next round and a meeting with the 103rd-ranked Krajinovic.