The win was Nadal's record-extending 57th victory in Madrid.
Nadal was also 16 when he played the event in the Spanish capital for the first time.
The 37-year-old, a 22-time Grand Slam champion, said that he is far from being in top form and that he is only playing against American Darwin Blanch in the first round of the Madrid Open on Thursday as a personal sacrifice.
The 22-time Grand Slam title winner, back on court this week after three months on the sidelines, battled well but eventually crumbled against the hard-working world number 11 from Australia.
The 22-time Grand Slam champion had not played a competitive match since January but eased past the 62nd-ranked Cobolli in 85 minutes to reach the second round.
Nadal's return a few weeks ahead of the French Open raises hopes the Spaniard will be able to compete in Paris, where he is a record 14-time winner.
Tennis superstar Rafael Nadal said Monday returning to action at the Barcelona Open is a "gift" and he wants to enjoy every moment of what he expects to be the last year of his career.
The 22-time Grand Slam winner has played just once, in an exhibition match, since he felt a hip injury flare-up during a quarter-final defeat by Jordan Thompson in Brisbane on the eve of the Australian Open.
Rafael Nadal will make his return to ATP competition for the first time since January when he plays Flavio Cobolli in the Barcelona Open next week.
Rafa Nadal's withdrawal from the Monte Carlo Masters has cast doubt over the 22-times Grand Slam champion's participation at the French Open, but Novak Djokovic said he is still hoping for a final chapter in their storied rivalry.
For any other player but Novak Djokovic, a below-par Australian Open at the age of 36 would have had pundits brushing up his tennis obituary. Djokovic, of course, is no ordinary player.
Rafael Nadal on Wednesday hailed longtime rival Novak Djokovic as the best player in the history of the sport.
The popular American former world number one, himself widely considered among the best the sport has seen, also had lavish praise for Roger Federer and Rafael Nadal.
The changing of the guard in men’s tennis has long been on an asymptotic course, getting closer and closer to the inevitable but not quite materialising.
The 22-time Grand Slam winner has been plagued by injuries throughout his career, including missing 11 majors through a series of injuries
"Right now I am not ready to compete at the maximum level in five-set matches. I'm flying back to Spain to see my doctor, get some treatment and rest," he said on X, formerly known as Twitter.
Rafael Nadal said he would have to wait and see how his body recovered after needing a medical time-out towards the end of his quarter-final loss at the Brisbane International on Friday.
Spanish great Rafael Nadal's comeback to tennis came to an end when he lost a 3hr 25min marathon quarter-final to Australian Jordan Thompson at the Brisbane International on Friday.
Playing his first tournament since being forced to retire injured at the 2023 Australian Open, Nadal was far too strong for the Australian, who did not have the shots to harm the Spaniard.