Former Arsenal midfielder Cazorla, who overcame an ankle injury that could have ended his career, scored his side's second goal in Cadiz.
It was the 34-year-old's first strike for his country since scoring in a friendly against England on November 13, 2015.
Three-time European champions Spain had already clinched qualification for the summer's finals but had drawn their last two games against Norway and Sweden.
But there were to be no slip-ups against Malta as Alvaro Morata joined Cazorla on the scoresheet in the first half before Pau Francisco Torres, Pablo Sarabia, Dani Olmo and Gerard Moreno all scored in a nine-minute second-half onslaught and Jesus Navas added a late seventh.
But the keeper had little to do as Spain dominated from the off and took the lead in the 23rd minute through Morata.
The Malta defence could not clear a Cazorla corner and after the ball was nodded back into the danger area by Rodri, Moreno flicked on for Morata to bundle home his seventh goal in as many games for club and country.
Sergio Ramos had a header saved by visiting goalkeeper Henry Bonello but Spain were not to be denied a second before the break.
And it was Cazorla who provided the finish in the 41st minute after he was played in by Villarreal team-mate Moreno's first-time pass and calmly slotted in off the inside of the left post.
Moreno missed the chance to get his own name on the scoresheet shortly before the interval when he steered wide following a fine cross from Sarabia.
Malta battled on until the floodgates opened in the 62nd minute. Villarreal's Torres, who had just come on to make his debut, turned the ball in from close range after getting on the end of fellow substitute Paco Alcacer's cross.
A minute later, Sarabia claimed his first international goal on his full debut. He was found by Moreno on the edge of the area and the Paris St Germain forward sidefooted a first-time effort into the top corner left.
Dinamo Zagreb forward Olmo – another debutant – found the net three minutes into his international career as he raced on to Thiago's brilliant defence-splitting pass and rounded Bonello before tapping home in the 69th minute.
And just two minutes later Moreno added his first international goal as he found the net from Juan Bernat's fine cross.
Former Manchester City winger Navas – who lined up at right-back for the game – rounded off the scoring in the 85th minute with a placed finish into the top left corner from 25 yards.