Sudan-born striker Ali scored with an acrobatic bicycle kick after just 12 minutes before Abdelaziz Hatim curled in a superb second and Akram Afif converted a VAR-assisted penalty to give the 2022 World Cup hosts a famous victory in Abu Dhabi.
Qatar survived a scare at 2-0 when Takumi Minamino pulled one back on 69 minutes, only for Uzbek referee Ravshan Irmatov to award the Maroons a penalty on review for a handball by Japan captain Maya Yoshida.
Ali became the first player to score nine goals at a single Asian Cup after only being cleared to play just hours before kickoff following a UAE protest over his eligibility.
The Qataris had been pelted with plastic bottles and shoes during the 4-0 semi-final thrashing of hosts United Arab Emirates over the Gulf blockade of the tiny, energy-rich state.
Emirati football officials subsequently lodged a formal protest over the eligibility of Ali and Iraqi-born defender Bassam Al-Rawi, which has been thrown out by the Asian Football Confederation.
Qatar had never before gone beyond the Asian Cup quarter-finals but they scored 16 unanswered goals coming into the final and kept a record six clean sheets.
Japan, meanwhile, had never lost an Asian Cup final, winning the last of their record four titles in 2011.
But the Blue Samurai were soon chopped down to size by Ali's outrageous opener, taking him past Iran legend Ali Daei's record tally of eight goals at the 1996 tournament.
Cleverly found by Afif, Ali flicked the ball up to himself before launching into an overhead volley that left Japan goalkeeper Shuichi Gonda helpless as it flew in off the post.
Ali almost scored again within a minute, only to be denied by a desperate block from Yoshida.
However, Qatar doubled their lead in the 27th minute after yet another Afif assist - his 10th of the tournament - as Hatim bent in a sumptuous left-foot shot from distance.
Japan, whose only previous Asian Cup defeat by Qatar came 31 years ago, mustered little of note, much to the chagrin of their colourful fans among a crowd of 36,000 - several sporting fancy dress, including one hardy soul in an inflatable sumo suit.
That all changed when Minamino breached Qatar's defence for the first time this tournament with a delicate chip after Hatim had blazed over from close range.
But moments later Afif ended Japan's resistance from the spot to complete a fairytale triumph for Qatar.