The Japanese player came through 7-6 6-4 6-2 after two hours and 22 minutes of play.
In a closely-fought opening set, both players traded breaks early on. With the score at 5-4, Mayer saved three set points on his own serve before winning the game to level matters. The set entered a tie-break that Nishikori claimed 7-5.
The number 12 seed enjoyed the better of the second set, breaking twice to establish a 4-1 lead. Despite losing a service game of his own, Nishikori regained his composure to win the set 6-4.
Mayer struggled to keep up with his opponent in the third set as Nishikori broke twice again to move 5-2 ahead. He then served out the match to secure a place in the last 32.