The Japanese number one broke Ramos on two occasions during the opening set on his way to wrapping up a 6-2 success.
The second set appeared to be heading for a similar outcome when Nishikori was serving to win the match at 5-4 up.
However, Ramos responded with a break of his own to level up proceedings at 5-5.
The Spanish player couldn't make the most of his late broke though, losing the next two games as Nishikori sealed a 6-2 7-5 win.
Paul-Henri Mathieu is next up for the 22-year-old.