Federer, who was playing the British number one for the first time, won 6-1 6-4 in one hour and four minutes.
Edmund's nervousness against the 20-times grand slam champion was evident when he started his first service game with two double faults.
— ATP Tour (@ATP_Tour) March 13, 2019
He was 5-0 down in the first set before he won a game, but Federer comfortably closed the set out.
The second set was a closer affair, but Federer broke in the fifth game after a forehand winner down the line set up two break points.
The 37-year-old Swiss was tested in the final game as Edmund had three break points.
But Federer saved them all and booked his place in a 13th Indian Wells quarter-final when Edmund sent a forehand into the net.
Speaking of their first meeting, Federer admitted the conditions of the match were tough but said Edmund still had what it takes to achieve big results.
"He didn't have the best start, so that cost him the first set. Second set, it was definitely better," the 37-year-old told the ATP website.
"I think he probably struggled throughout a little bit. He never really got going. Conditions are tough with the glare, and the jump of the ball is sometimes hard to find the rhythm and timing.
"He's got everything in the game. It's just a matter of keeping improving, keep plugging away, and then he will make big results again. He knows that."