Rahm overturned a four-shot last-day deficit to reel in Koepka, then resisted an inspired charge from ageless marvel Mickelson to record a not-entirely-comfortable four-stroke triumph.
The Spanish superstar's success came, fittingly, on the 40th anniversary of Ballesteros' second Masters win in 1983 and on what would have been his wizardly idol's 66th birthday.
"I'm at a loss for words," Rahm said.
"For me to get it done on the 40th anniversary of his win, his birthday, on Easter Sunday, it's incredibly meaningful."
With a final-round 69, Rahm finished with a 72-hole total of 12-under-par 276 and celebrated with fellow Spanish winners Jose Maria Olazabal (1994 and 1999) and Sergio Garcia (2017).
It was the 28-year-old world No.3's sixth win in his past 13 worldwide starts and a victory of sorts also for the PGA Tour in its ongoing civil war with the Greg Norman-led, Saudi-backed LIV Golf breakaway league.
Mickelson, aged 52, and Koepka, the joint runners-up, would have given LIV its first major championship had they won.
Instead, Rahm earned his second after adding the green jacket to his 2021 US Open trophy.
In a typically riveting finish to the year's first major, Mickelson closed with a rousing seven-under 65 to snatch the clubhouse lead and apply the blow-torch to the final pairing.
Mickelson reeled off eight birdies, including five in his last seven holes, to threaten to pull off one of the great steals in golf.
But the three-time champion had to settle for a second runner-up showing at Augusta - and an incredible 10th top-three finish overall.
But while Rahm held firm in the face of Michelson's fierce challenge, Koepka was unable to respond and faded with a final-round 75.
Koepka had seemingly been on track to become LIV Golf's first major winner after surging four shots clear before Saturday's third round was suspended because of relentless rain.
But he couldn't buy a birdie upon Sunday's resumption of play.
Koepka went 22 consecutive holes without a birdie before finally landing three in four holes from the 13th to 16th.
It was too little too late as Koepka came up short in his quest for a fifth major - four years and career-saving knee surgery after his fourth.
As well as Mickelson, a host of heavyweights made final-round charges.
Jordan Spieth, the 2015 champion, got to eight under only to drop a shot on the last to miss his chance at joining Mickelson as clubhouse leader.
Augusta native Patrick Reed, the 2018 winner, finished equal fourth with Spieth and US compatriot Russell Henley (71) at seven under following a stirring Sunday 68.
After starting the final round nine shots off the pace, world No.1 and defending champion Scottie Scheffler moved to six under through 11 holes before a double-bogey five on the famous 12th ended his challenge.
Scheffler eventually finished tied for 10th at four under.
It was a horror day for Australian big guns Jason Day, Cameron Smith and Adam Scott.
Day had been well in the mix to secure a top-12 finish and an automatic ticket back next year before crashing from three under to five over in 45 spectacular minutes.
The former world No.1 racked up four double-bogeys in five holes.
The first came via a shocking four-putt on the ninth before Day crashed and burned on Amen Corner with further doubles on the 10th, 12th and 13th holes.
The meltdown allowed Smith to climb above Day as the leading Australian in a share of 34th spot at four over with closing rounds of 75-75.
Scott finished at five over with Day in a tie for 39th after weekend rounds of 74 and 77.