Image credit: Getty Images
After a flawless first set from Mertens the tide turned in Andreescu's direction in the second when she fired a cross-court forehand winner to break the Belgian at love and take a 4-2 lead.
She fired another winner, her 40th, up the line to seal the win under the lights at Arthur Ashe Stadium.
"I need someone to pinch me right now, is this real life?" she said in an on-court interview.
"I just told myself to stay calm and stick to the tactics," she said when asked what she told herself after falling behind.
Andreescu will next face fellow first-time semi-finalist Swiss Belinda Bencic.
The quarter-final offered a fascinating contrast in styles between the explosive power of the Canadian teenager and the steady counterpunching of the 23-year-old Mertens.
But once the 15th-seeded Andreescu found the range with her punishing groundstrokes, she was able to wear down the 25th-seed and pile up the winners.
The victory continues a strong-run for the 19-year-old, who clinched titles at Indian Wells in March and last month's Canadian Open.
Bradley Wiggins (Stage 17, 2012)
Eliteserien, Round 5
Eliteserien, Norwegian Commentary