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.
Puzzle-maker slips 'Murdoch Is Evil' into Rupert Murdoch's Sunday Telegraph
Sign language interpreter at Mandela service called out as fake on Twitter