The 16-year-old wannabe singer, who made it to the final with Johnny Ruffo and Andrew Wishart last week, was named as the winner of the reality TV show after performing Aerosmith's 'Cryin' for a live audience.
Perth-based Ruffo was placed in third, while Natalie Bassingthwaighte's protégée Wishart was announced as the runner-up. After discovering he had won The X Factor, Mastin thanked his family, friends and mentor Guy Sebastian for supporting him throughout the competition and also his fans for their votes.
"My journey has only been going for this long because of all the people out there who voted for me," he said. "I just want to thank all the little rockers out there."
Mastin was tipped to win The X Factor from early on in the contest, with judge Ronan Keating telling him he should quit school to focus on his music career. Mel B also said that it would be a "shame" if he did not win.
Kylie Minogue, The Fray, Salt 'n' Pepa and Sebastian all performed during the two-part grand final show.
Mastin's winner's single is scheduled to be released in the next few days. Watch him perform 'Good Night' on The X Factor grand final below: