The 23-year-old Devvarman, ranked 202, won 4-6, 7-5, 6-4 to pull off the biggest win of his career, stunning the No. 42-ranked Moya, who was the sixth seed in the tournament he had won in 2004 and '05.
Making the first quarterfinal of his career, Devvarman will now meet fourth-seeded Ivo Karlovic of Croatia, who outplayed Czech player Ivo Minar 6-1, 6-4 in the second round Thursday.
Others advancing to the quarterfinals were seventh-seeded Serbian Janko Tipsarevic and eighth-seeded Marcel Granollers of Spain.
Tipsarevic defeated Israel's Dudi Sela 7-6 (3), 6-4 and Granollers coasted to a 6-4, 6-1 victory over Andreas Beck of Germany.
Devvarman, the U.S. collegiate champion in 2006 and '07 as a student at the University of Virginia, had received a wild card for this tournament in the city where he honed his skills as a child.
Devvarman, who last year played in two Davis Cup ties without much success, on Thursday proved a tough rival for the former French Open champion.
Moya broke in the second game of the opening set, only to see Devvarman pull back to 3-3. Another break by the veteran Spaniard in the 10th game decided the first set.
Devvarman won the second set when he broke Moya's service in the 11th game and then held his own service with ease. The decider third set saw Moya trail after dropping serve in the third game, and Devvarman played with aplomb to deny him a chance of getting back into the contest.
"I sent a message to him that I just wasn't going to go away,'' Devvarman said.
"When you see a player on the other side trying to do too much, you know he's under pressure,'' said Devvarman, who became the first Indian player to reach the quarterfinals of this event since Leander Paes made the semifinals in 1998.
"Hopefully, I'm not just quarters. I'm not one of those guys who gets content easily,'' he said.
Top-seeded Davydenko advances, Wawrinka loses
Figo Delighted With Ronaldo’s Ballon d’Or Win
Casillas Denies Eto’o Again In ‘Iker Vs Nadal’ Charity Game