The French world number 65 saw off the number one seed in three sets to deliver one of the upsets of the tournament.
"This is maybe the best win of my career, it has made me very happy," the 30-year-old told BBC Sport.
"I'm sure Andy will do well at Wimbledon, I'm sorry to the people here but I'm sure that you will see him winning matches soon.
"This is probably the best tennis of my career. I am very confident in my game and I think I can do more."
Mahut will take on Bulgaria's Grigor Dimitrov in the third round.