The 25-year-old Capetonian won in straight sets, 6-3, 6-4, in a match which lasted 79 minutes.
Harris had beaten Argentina’s Facundo Bagnis 6-3, 6-3 in his opening round match.
Harris will take on Japan’s Yoshihito Nishioka in the Round of 32.
Lloyd Harris ranked ahead of Roger Federer
They have played once previously with Harris emerging victorious which bodes well for his chances in the clash scheduled for Monday.
It’s the first time in his career that Harris has been ranked ahead of the 20-time Grand Slam winner.
Despite not having played in what feels like forever, Federer has remained high up in the rankings such is the somewhat puzzling system used by the ATP Tour.
However, Federer has now dropped down the rankings after losing the points he won at last year’s Miami Open.
Daniil Medvedev (x1) bt Andy Murray (SCO) 6-4, 6-2
Carlos Alcaraz (ESP x14) bt Martin Fucsovics (HUN) 6-3, 6-2
Stefanos Tsitsipas (GRE x3) bt JJ Wolf (USA) 6-4, 6-7 (5/7), 6-1
Lloyd Harris (RSA) bt Denis Shapovalov (CAN x12) 6-3, 6-4
Marin Cilic (CRO x21) bt Alexei Popyrin (AUS) 6-0, 6-3
Jenson Brooksby (USA) bt Nikoloz Basilashvili (GEO) 6-3, 6-1
Pedro Martinez (ESP) bt Christian Garin (CHI x27) 7-6 (7/2), 6-2
Roberto Bautista (ESP x15) bt Kamil Majchrzak (POL) 6-3, 6-3
Yoshihito Nishioka (JPN) bt Daniel Evans (GBR x24) 3-6, 6-4, 6-3
Aslan Karatsev bt Ugo Humbert (FRA) 7-5, 6-2
Hubert Hurkacz (POL x8) bt Arthur Rinderknech (FRA) 7-6 (7/5), 6-2
Alex De Minaur (AUS x25) bt Jordan Thompson (AUS) 6-2, 6-3
Taylor Fritz (USA x11) bt Mikhail Kukushkin (KAZ) 6-3, 5-7, 6-3
Tommy Paul (USA) bt Karen Khachanov 6-4, 3-6, 7-6 (7/3)
Sebastian Korda (USA) bt Albert Ramos (ESP x32) 4-6, 7-6 (8/6), 6-3
Miomir Kecmanovic (SRB) bt Felix Auger-Aliassime (CAN x7) 6-4, 6-2