The opening set took just over an hour to complete after a tight affair with both competitors holding their serve and executing shots to deny one another the breakthrough.
A tie-break was needed to decide the first set, which was dominated by eighth seed Nishikori, who managed to snatch the lead with a 7-2 win in the set showdown.
The Japanese number one then cruised into a 4-1 advantage in the second set after breaking the Spaniard early on.
Ramos battled hard though and saved surrendering his serve for a second time by holding after Nishikori took him to deuce in the sixth game.
The pair then exchanged games once more, leaving Nishikori to serve for the match at 5-3. He did so successfully to claim a 7-6 6-3 win over the hometown hero and set up a last-eight meeting against either Fernando Verdasco or Kevin Anderson.