The world number 30 Anand lost 21-18 13-21 13-21 in a 50-minute battle against the local shuttler, who is ranked 64th in the BWF ranking.
Seeded third in the qualifiers, Anand could not match Nan's smashes and net play and missed a chance to be in the main draw, which starts from tomorrow.
Anand had an early advantage of four points but Nan clawed back to 5-5 and then moved ahead 14-11 but the Indian got his act together, reaching 17-15 and then kept his nose ahead to take the first game.
In the decider, Nan once again surged ahead 5-2 and though Anand tried to fight back, the local shuttler broke off from 10-10 to eventually win it comfortably.