He also reached the final at Vina del Mar and Monte Carlo and Sunday's success was his third at the Masters event in the Spanish capital.
Wawrinka, who came through gruelling matches against Jo-Wilfried Tsonga and Tomas Berdych on the way to his second Masters final, never looked like claiming a first win against Nadal at the ninth attempt.
Nadal broke his serve three times in the match and did not face a single break point himself and collapsed on to his back in celebration when Wawrinka went long with a backhand to hand the Spaniard victory.
"Maybe this win is even more special given where I have come back from," Nadal said in an interview with Spanish television broadcaster La Sexta.
"Playing in Madrid is always very exciting for me and the tournament couldn't have worked out better," he added.