The win hardly made any difference to the final standings as Australia, with four points from a victory and a draw, finished on third position in Pool A behind leaders England and second-placed Belgium.
Pakistan dismal show continued as they slumped to their third straight defeat in the elite eight-nation tournament.
While Hayward (23rd and 54th minutes) converted two penalty corners for Australia, the other goal was a field effort from Jacob Whetton in the 59th minute.
After a barren first quarter, Australia finally broke the deadlock when Hayward scored from a penalty corner rebound.
Also Read
Thereafter, Australia came close through Chris Ciriello and Whetton but failed to increase their lead.
Simon Orchard was then denied by Pakistan goalie Imran Butt before Matt Gohdes failed to get the ball past the defender on the line with the follow-up.
Trailing, Pakistan started to build attacks in the final quarter in search of the equaliser but could not find the back of the net.