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.
Millions of Getty images now available for free via embed tool
Ray Liotta sues skin care company over use of likeness