Federer will next play Tomas Berdych of the Czech Republic, who edged Andy Murray of Britain 4-6, 7-6 (5), 6-4.
Jo-Wilfried Tsonga of France also advanced after his opponent, top-ranked Novak Djokovic, pulled out because of a shoulder injury.
Federer slammed seven aces and hit 25 winners compared to only eight for Monaco.
The 16-time Grand Slam champion won five straight games to rally from a 3-1 deficit and took the first set when Monaco netted a backhand.
Federer broke for a 6-5 lead in the final set when Monaco made a forehand error, winning the match with an ace.
Earlier, Murray broke Berdych in the seventh game and took the first set with a crosscourt forehand winner.
The Briton rallied from a 5-2 deficit in the second to force a tie-breaker but Berdych hit a forehand winner to level at one set apiece.
Berdych broke serve at 4-4 in the final set and held on to clinch victory.
Short link: