The win was the 23-year-old's first on the DP World Tour and third as a professional, and his victory is the first in the event by a Spanish player since Seve Ballesteros claimed the title in 1981.
"It feels amazing," said Puig, whose previous professional wins had come on the Asian Tour. "I really had a lot of close calls in a few events throughout this year and last year and I wasn't able to pull it through.
"It feels unbelieveable, especially winning here in Australia. Awesome golf, so really excited and happy."
Puig had gone into the final round in a three-way tie with Portugal's Ricardo Gouveia and Australian Anthony Quayle but soon pulled away from the field with birdies at the second, third and fourth holes.
A 20-foot putt for birdie at the eighth gave Puig a three-shot lead over the chasing pack with both Gouveia and Quayle falling back.
Ding, who had started the day two shots off the lead, made a slow start with a bogey at the first but four birdies in the last five holes before the turn pulled the Chinese golfer into contention.
However, another bogey at the 10th left the 21-year-old from Beijing adrift, although a birdie at the par-three 17th moved him to sole possession of second place.
Australia's Marc Leishman finished in a tie for third alongside New Zealander Nick Voke on 15-under par with 2023 winner Min Woo Lee a further shot back in fifth alongside Daniel Hillier.
