Ferrer, the number four seed, struggled throughout, losing his serve in the very first game, hitting 43 unforced errors and eventually going down 7-6, 3-6, 2-6 in an eventful clash lasting over two and a quarter hours.
Immediately after, number two seed Rafael Nadal survived another potential upset, losing the first set against fellow Spaniard Pablo Carreno Busta, before winning 6-7, 6-2, 6-1.
But Ferrer’s defeat was the big talking point of the night.
”He was better than me all the match. From the first set, he deserved to win the match,” said a gracious Ferrer, the world number seven.
The Spaniard, who said he lacked energy throughout the match, was playing with a new racquet but said this was not the reason for his loss.
”I am happy with the racquet. The problem is not the racquet, it’s my serve.”
For Marchenko, the result represented the best victory of his career.
Before Tuesday’s game he had never beaten anyone in the top 10.
More remarkably it was the first time that Marchenko had even won a set against a top 10 player.
”It was a fantastic day for me, I am really happy with the performance,” said the 28-year-old.
”It’s a fantastic way to start the season.”
Marchenko even missed a chance to take the first set.
He squandered a set point serving while 5-4 ahead. This allowed Ferrer to claw his way back in typical fashion, eventually taking the tie-break 10-8 in an opening set lasting one hour and eight minutes.
But any thoughts that Marchenko might fold were immediately dismissed when the Ukrainian broke the Spaniard’s serve in the very first game. The 28-year-old held onto his lead and then powered through the final set to claim a famous victory.
Despite double-faulting three times in the final game, Marchenko eventually closed the match out to claim a second round clash on Wednesday against Russia’s Teymuraz Gabashvili.
Ferrer won the Qatar Open last year — one of five World Tour singles titles he took during 2015 — beating Tomas Berdych in straight sets in the final.
– Nadal survives scare –
For a while it looked as if Nadal may follow Ferrer and exit the tournament in the first round.
The world number five lost the first set on a tie break to the powerful Carreno Busta, who squandered three set points before finally winning 7-5.
The world number 67 stretched his opponent at times in the first set, but gradually Nadal, who won last week in Abu Dhabi, imposed himself upon the match, dropping only a further three games in a match lasting exactly two hours.
”In the second and third sets, I played well, little mistakes and I was very positive,” said Nadal, who admitted he was ”a mess” in the first set.
The 14-time Grand Slam winner will play the ”dangerous” Robin Haase in the second round.
Earlier on Tuesday, Berdych, who is this year’s number three seed, beat another Ukrainian, Sergiy Stakhovsky, in straight sets, 7-5, 6-4.
The Czech said he was ”feeling good” after his victory. (AFP)