It was the final spring training appearance for the Japanese star, who will make his first regular-season start next Friday in Toronto. He replaced starter Hiroki Kuroda in the fourth inning and struck out the first three batters he faced - Garrett Jones, Jarrod Saltalamacchia and Derek Dietrich.
In five exhibition games, Tanaka gave up five runs and struck out 26 over 21 innings.
''I feel pretty good about him,'' Yankees manager Joe Girardi said. ''What he's done in spring training, the way he's adjusted. He's cleared every hurdle at spring training.''
The right-hander signed a $155 million, seven-year contract in January. He was 24-0 with a 1.27 ERA last year while leading Rakuten to its first Japan Series title.
The Yankees were held hitless until Kelly Johnson had a leadoff double during a two-run eighth.
Marlins: Kevin Slowey had two strikeouts during three perfect innings.
Yankees: Kuroda allowed three hits and struck out four in three innings.
Yankees center fielder Jacoby Ellsbury had an infield single and a single to center in five at-bats during a minor league intrasquad game.
Ellsbury, out the past two weeks due to right calf tightness, scored a run and played six innings of defense during his third minor league game over the last four days. He is expected to be ready for opening day Tuesday.
''I feel pretty confident,'' Ellsbury said. ''Pretty much those last couple days got everything I needed to do.''
New York switch-hitter Mark Teixeira has struggled from the left side this spring.
Turns out, hitting coach Kevin Long discovered that Teixeira was letting his hand off the bat too soon when swinging. Teixeira is coming back from right wrist surgery last July.
''It was something I didn't know I was doing,'' Teixeira said. ''I was protecting my swing the way I was doing last year when I was hurt. I think it was the bad habits I got into last year.''
With his mechanics improving, Teixeira is nearing another goal.
''I wanted to leave spring training feeling really healthy, and knock on wood, tomorrow I'll do that,'' he said.
Also, Dean Anna will be a backup infielder, with Brendan Ryan starting the season on the disabled list due to back spasms. The status of reserve infielder Eduardo Nunez is in limbo entering the final day of camp Saturday.
Marlins: Manager Mike Redmond said shortstop Aden He Chavarria (groin tightness) could play five innings in Saturday's game.
The Marlins recalled infielder Donovan Solano from Triple-A New Orleans. He will take the roster spot of infielder Ed Lucas, who broke his left hand in Thursday's game and is expected to miss four to six weeks.
The Yankees signed right-hander Alfredo Aceves to a minor league contract. He will be in the rotation at Triple-A Scranton/Wilkes-Barre.