The African side took a two-goal lead in the first half but a mesmerising performance from the Barcelona star, who pulled the strings throughout, secured the win
The Barcelona attacker set up all three goals for Jorge Sampaoli's men, whose high line had been exposed by Mohamed Salah and Khaled Kamar in the first half.
Alexis provided Marcelo Diaz's goal in the first half and did exceptionally well to set up Eduardo Vargas' second-half brace.
Despite not being at full strength, the defence would have worried Sampaoli, whose team face Spain, the Netherlands and Australia at the World Cup.
Having earned a free kick, Sanchez carved out the first opportunity of the game as he brought down the set piece before scuffing a shot from just outside the area which Sherif Ekramy saved easily.
Egypt had looked forced into mostly long balls before making the most of an opportunity to open the scoring through Salah in the 12th minute.
Gary Medel gave possession away cheaply in the middle third and the Chelsea attacker was released in behind by Mohamed El Nenny and finished neatly past Claudio Bravo in a one-on-one.
Just four minutes later and Egypt doubled their lead.
Kamar beat the offside trap to latch onto Ali Ghazal's long pass, netting his first international goal with an exquisite chip over an onrushing Bravo.
Chile had half-chances from set pieces and range but struggled to break down an Egypt side content to sit deep and hit on the break.
Alexis helped his side back into the game by setting up Diaz to make it 2-1 in the 26th minute. His run down the right led to him squaring for the Basel midfielder, whose first touch bounced up and allowed him to volley into the bottom corner and in off the post.
Bravo was forced into two good saves, including once from a corner, while Vargas was denied an equaliser by Ekramy's stop soon after.
Alexis was denied twice more before half-time as Ekramy kept out his stinging volley and then watched as the lively attacker headed a glorious chance over the bar.
Chile looked more comfortable in possession to start the second half, but struggled to create clear-cut chances.
On the hour-mark, more genius from Alexis saw Chile level. From the right, he picked out the deep run of Vargas, who finished first time past substitute goalkeeper Essam El-Hadary.
The Barcelona forward was at it again to set up what proved to be the winner in the 78th minute.
Receiving a pass with his back to goal and just inside the attacking half, he lost his marker before picking out Vargas through the centre of a big hole in the middle of Egypt's defence.
The attacker, who spent the season on loan at Valencia from Napoli, finished neatly, but Chile had to endure a couple of nervous moments to hang on.
Egypt substitute Ibrahim Abdul-Khaleq had an attempt cleared off the line, but the hosts held on for an entertaining win as they also survived a late penalty shout.
Chile wrap up their preparations for the World Cup with a clash against Northern Ireland on Wednesday before their Brazil 2014 opener against Australia on June 13.