Hayward's late trey nailed down a crucial victory for struggling Utah, which won for only the third time in 11 contests. He also pulled down eight rebounds.
The Grizzlies got 24 points from Jerryd Bayless but still dropped a second straight.
Zach Randolph provided 19 and nine rebounds for Memphis.
Pistorius testifies he didn't consciously pull trigger when he shot girlfriend
Pregnant Mila Kunis wins 'Best Villain' at MTV Movie Awards