The Knicks once held a seemingly insurmountable 25-point lead, but the Magic had whittled it down to 97-93 with 1:24 left and had a chance to cut the deficit further when Davis stole the ball from Beno Udrih.
Davis had a clear path to the basket but Shumpert hustled back on defense and blocked his shot from behind.
Davis regained the ball but missed on a 15-foot jumper, and the Knicks used six Udrih foul shots in the final seconds to clinch the victory.
Carmelo Anthony scored 19 points for New York before leaving with a left ankle sprain.
Arron Afflalo pumped in 25 points and Davis provided 20 with seven rebounds for Orlando.