The four-time FIFA Ballon d’Or winner made his first appearance for Barca in 59 days when he replaced Andres Iniesta after 63 minutes with Barcelona leading 2-0 thanks to a Cesc Fabregas double.
Messi put the tie to bed a minute from time when he slotted home a loose ball inside the area. And he added his 16th goal of the season with a stunning run and finish to round off the scoring in stoppage time.
With Messi watching the first half from the bench, Barça boss Gerardo Martino persisted with his front three of Alexis Sanchez, Pedro Rodriguez and Fabregas and they justified his selection when ]Pedro’s lobbed cross was expertly headed into the far corner by Fabregas after just eight minutes.
However, Getafe then managed to stifle Barça from creating too many clear-cut chances before the break and indeed the hosts were grateful to a great save from Jose Manuel Pinto to turn away Juan Rodriguez’s header to go in ahead at half-time.
Barça did finally have the breathing space they craved when Juan Valera upended Pedro inside the area and Fabregas blasted the resulting penalty into the top corner.
That set the scene for Messi’s arrival and he didn’t disappoint as he calmly slotted home a loose ball inside the area with his trusted left-foot after Martin Montoya had burst into the Getafe box.
The best was still to come, though, as Messi embarked on a trademark run through the Getafe defence before slamming high past Jordi Codina to leave next week’s second leg in Madrid a formality.
In other Copa del Rey matches Wednesday, Real Betis saw off Athletic Bilbao 1-0 courtesy of Ruben Castro’s 42nd-minute strike and Racing Santander’s David Concha cancelled out Miguel Corona’s opener for Almeria as the two sides battled to a 1-1 draw.
Elsewhere, Alcorcon edged Espanyol 1-0, who take their slim lead to the Cornella-El Prat stadium for the second leg match-up next Wednesday, 15 January.