"I'm incredibly happy to end the year like this," said Nadal afterwards.
The 33-year-old had been an unstoppable force in Spain's pulsating semi-final against Britain on Saturday and never looked like letting this chance slip, with King Felipe VI and Real Madrid's Sergio Ramos watching on, along with Barcelona defender Gerard Pique.
Pique's marketing company Kosmos have been at the heart of the raft of changes to this 119-year-old competition but Nadal's brilliance has been familiar, even if this will surely go down as one of the finest seasons of the 19-time Grand Slam champion's sparkling career.
He added a fourth Davis Cup final success -- three more than Roger Federer -- to the ones he claimed in 2004, 2009 and 2011, while capping a remarkable 12 months that has included winning the French and US Opens, and ending the year as world number one.
The Spanish team will also pocket a cheque worth $2.1 million.
Nadal won eight out of eight rubbers played this week and at times on Saturday, as when he stormed to singles and doubles victories against Britain, it was tempting to view Spain's progress as something of a solo effort.
- Spain boost revamped event -
But, unlike Canada, Spain have used all five of their squad, with Bautista Agut, Pablo Carreno Busta and Feliciano Lopez all playing at least one singles match, and Lopez and Marcel Granollers joining forces in the doubles.
There has also been the undeniable advantage of the home crowd and although Spain's success has delivered a huge boost to the event in its inaugural year, some will argue it might have been fairer to find a new venue in 2020, let alone consider keeping it in Madrid until 2021.
Hosting and mixed attendances are among several issues for Pique and the International Tennis Federation to solve in the coming months but on the court, some gripping ties have ensured the new Davis Cup has got off to an encouraging start.
Bautista Agut's win over Auger-Aliassime was particularly poignant, given the world number nine was returning after withdrawing from the team on Thursday, following the death of his father Joaquin.
"I could not have played today without all the work of my team-mates this week," said Bautista Agut on court afterwards.
"After such a complicated week, I had to get out there and face it. Everything was difficult today but I managed to overcome it and get the first point for Spain."
Shapovalov, meanwhile, had ousted Nadal at the Canada Masters when they first met in 2017 but he was no match here for the veteran's power and sheer force of will.
A blistering forehand on the run set up the decisive break in the first set, which Nadal served out when Shapovalov hit long.
The youngster had a break point early in the second but slapped his return into the net and Nadal held on, surviving a nine-minute game when a Shapovalov retrieval plopped out.
Shapovalov opted for more variety with a brilliant touch volley and then a deft drop-shot making things increasingly uncomfortable for Nadal, who came under pressure when serving to stay in the set both at 5-4 and 6-5.
In the tie-break, Shapovalov led early but missed a short forehand for 4-2. Instead, Nadal won four of the next five to tee up two points for the title. He looked sure to convert the first, on serve, but Shapovalov ripped a forehand pass.
Two big serves saw Shapovalov save the second and then create a set point of his own. But Nadal saved it for 7-7 and a return into the net gave him a third championship point.
When a Shapovalov forehand hit the tape, Nadal fell on his back, his arms outstretched.