After being held to seven runs in dropping two of three to Toronto, the Yankees got 15 hits and improved to 9-1 against Baltimore this season. New York swept a three-game series from the Orioles at Yankee Stadium last week and has won 13 of the last 17 in Baltimore.
Teixeira, who came in batting .211, went 3 for 4 with two walks. Swisher entered in a 1-for-14 skid and ended up with three hits, as did Robinson Cano. Derek Jeter scored the game's first run and Brett Gardner went 2 for 4 with a run.
Phil Hughes (8-1) gave up three runs and nine hits in six innings to earn his second victory over the Orioles in a week. His eight wins is tied for the AL lead and matches his career high.
"I think it was a total team effort today," Swisher said. "Tex with three big hits. Robbie had three hits. Gardy had a couple of hits. Jete had some hits. Phil gave us a chance to win, and it's nice to get back on track, especially after our Toronto series."
Adam Jones homered for the Orioles, who have lost 11 of 12. Baltimore is 1-3 under interim manager Juan Samuel and has been outscored 31-9 in the three defeats.
Samuel took consolation in watching Baltimore score the game's final four runs after falling behind 12-3 in the seventh.
"For me, the good sign is that we kept scoring because we could have easily folded," Samuel said. "These guys kept coming even when they had 12 runs there. We showed that we could come back, and that's something we know that this club can do. It's been positive for me so far."
Six pitches into the game, the Yankees had a 2-0 lead. After Jeter drew a leadoff walk, Swisher hit Kevin Millwood's next offering over the center-field wall.
Granderson's second career grand slam -- and New York's fourth this season -- made it 6-0 in the third. After two singles and a walk loaded the bases with two outs, Granderson drove a 2-2 pitch from Millwood (0-7) over the right-field scoreboard.
"I was trying to battle with two strikes and put the ball in play and ended up getting a pitch out over the plate that I was able to get some good wood on," Granderson said. "I ended up hitting it out of the ballpark."
Half of Granderson's four home runs this season have come against Baltimore, both this month.
Millwood allowed six runs, 10 hits and five walks in 5 2/3 innings. The right-hander has gone 13 starts in search of his first win with the Orioles.
"I'm just not throwing the ball where I want to. I need to locate to pitch well," Millwood said. "With five walks, I'm definitely not where I want to be, and some the balls they're hitting are in bad spots."
But New York ended any remaining suspense by batting around in a six-run seventh. The key hits were a three-run double by Swisher and a two-run homer by Teixeira.
It was Teixeira's first three-hit game since May 8.
"It just looked like he was staying on the ball longer, like he was trying to use the middle of the field, and it resulted in him staying back and hitting the ball hard," manager Joe Girardi said. "I thought he had great at-bats tonight."
- Gardner left after seven innings after experiencing soreness in the right thumb that he broke last season. He doesn't expect to miss any time.
- Baltimore fell to 7-24 against the AL East.
- Despite getting three singles, Baltimore's Miguel Tejada extended his homerless streak to 142 at-bats, the second-longest stretch of his career.