It was a curiously passive performance from Edmund in the opening two sets and, after going 2-1 down in the third set, the British number one called the doctor.
It was not immediately obvious what was wrong but, after a lengthy chat, Edmund shook his head and then the hand of Cuevas.
Edmund ended a five-match losing run with an impressive five-set victory over Jeremy Chardy in the first round and had been looking to reach round three for the third year in a row.
Cuevas, ranked 47, is a classic clay-court specialist and has had a lot of match wins on the surface this season, including reaching the final of the ATP Tour event in Estoril last month.
But Beverley’s Edmund has bigger weapons, especially with his booming forehand, so it was a surprise to see him on the back foot for most of the contest.
He began poorly, dropping serve in the second game, but retrieved the break to level at 4-4 and withstood pressure from Cuevas to force a tie-break.
He had played a fine tie-break in his opening match against Chardy but this one was a different story, and things did not improve in the second set, where he lost the last four games.
It was not obvious that Edmund was having physical difficulties but it was clear he was frustrated, the 24-year-old slamming a ball down and shouting at himself after being broken in the seventh game of the second set.
The injury was clearly serious enough for Edmund to feel he could not continue, and Cuevas recorded a 7-6 (3) 6-3 2-1 victory.
The 24-year-old first suffered the knee problem at the end of last season and pulled out of his final event, the Paris Masters.
Edmund began his season as scheduled in Brisbane but suffered a surprise loss to Yasutaka Uchiyama and then withdrew from the Sydney International.
Although he took to the court at the Australian Open, he did not look fully fit and was well beaten by Tomas Berdych before taking a six-week break from the tour to try to recover.
His withdrawal means Johanna Konta is the only British representative left in the singles at the French Open.