His ninth inning at-bat provided just as much drama.
Machado hit a two-run, go-ahead homer off Max Scherzer and then got hit by a pitch from Jonathan Papelbon in the ninth for the Orioles, who rallied for a 4-3 victory over the Washington Nationals to move within four games of the final American League wild-card spot.
With the Orioles leading 4-3, Papelbon's first pitch to Machado was up and in. Then his third pitch was a fastball that caught Machado on his upper arm.
"When you throw at somebody's head on purpose first pitch, straight out the get-go, then you throw a curveball, then you throw again at the head, that's just ... ," Machado said, using a street term. "You know it's coward stuff. It's just coward."
Machado appeared to say something to Papelbon, but then went to first. Papelbon was ejected by plate umpire Mark Ripperger.
"They just said they deemed it intentional, and they didn't give me any reason," Papelbon said. "I don't know if they have to give me any reason or not, but perception is reality.
"If Manny thinks I hit him, then that's what he thinks. I'm not going to sit here and go back and forth whether I did or whether I didn't, because it doesn't matter. If he thinks I did, that's what he thinks."
Orioles manager Buck Showalter said of Papelbon: "He kind of reminds me of the wrestlers who pull somebody's hair and then they throw their hands up."
Washington's Bryce Harper was already looking ahead to Thursday's series finale.
"I mean, Manny freaking hit a homer," Harper said. "Walked it off, and somebody drilled him. I mean, it's pretty tired. It's one of those situations where it happens, and, I don't know, I'll probably get drilled tomorrow."
Steve Pearce had a two-run homer and a double for the Orioles.
Washington remains 6 1/2 games behind NL-East leading New York, which lost to Atlanta.
J.J. Hardy led off the seventh with a double against Scherzer (12-12). With two outs Machado lined Scherzer's season-high 122nd and final pitch into the seats in left center for his 30th homer.
"I finally got a good pitch to hit, and I drove it," Machado said. "I think it's been the hardest ball I've hit all year. One of my hardest home runs."
Baltimore starter Chris Tillman (10-11) allowed three runs over six innings for his first win since Aug. 17.
Scherzer gave up four earned runs and seven hits while striking out 12 and walking two.
He has 249 strikeouts on the season and set a Nationals (2005-present) record, surpassing Stephen Strasburg's 242 in 2014.
Scherzer has allowed 14 homers in his past nine starts.
Machado was nearly ejected in the fifth inning after Ripperger declined to grant him time and Scherzer's pitch was a called strike three.
Showalter came out and steered Machado away from Ripperger.
The Nationals rallied for a 3-2 lead in the fifth.
Ramos went to third on a single by Scherzer and scored on Anthony Rendon's sacrifice fly.
The Orioles took a 2-0 lead in the first. Chris Davis drew a two-out walk, and Pearce followed with his 14th home run.
Washington pulled with 2-1 in their half on Yunel Escobar's RBI single.
Orioles: CF Adam Jones (back spasms) missed his second straight game. ... RHP Miguel Gonzalez (right shoulder tendinitis) threw a three-inning simulated game as well as a 20-pitch bullpen session and is expected to throw another bullpen session Saturday.
Nationals: 1B Ryan Zimmerman (oblique) has been taking light swings but remains day-to-day. "When he goes out there and plays we want him to be able to let it go, so he's got to get to that point first," manager Matt Williams said.
Baltimore RHP Tyler Wilson (2-2, 3.72 ERA) pitches the series finale, making his second start since being recalled from Triple-A Norfolk. Wilson allowed six runs in 4 1/3 innings of a loss to Tampa Bay last Friday. He will be opposed by RHP Tanner Roark (4-6, 4.73), who lost his past two starts, both against the Marlins.
Scherzer was seeking his first win at Nationals Park since he no-hit the Pirates on June 20.
After Baltimore's Gerardo Parra appeared to injure himself on a swing, Showalter came out to check on him. "Shoulder," Showalter said. "I told him if he quit swinging and missing it wouldn't hurt so much." Parra remained in the game.
Kiley McDaniel's midseason top 50 MLB prospects
From Wander Franco to a wave of new names to know, here's how baseball's stars of tomorrow stack up today.
MLB Power Rankings Week 17: Where all 30 teams stand after the trade deadline
Who is rising and falling as the dust settles from a flurry of deals?
Who tops the MLB power rankings after the trade deadline?
Doug Glanville and Tim Kurkjian make their picks for the top team in baseball now that the trade deadline has passed.
Can Wander Franco keep his hot streak going?
Eduardo Pérez breaks down Wander Franco's hot hitting and his ability to make adjustments at the plate.
New York to visit Miami Thursday
New York Mets (56-51, first in the NL East) vs. Miami Marlins (46-62, fifth in the NL East)
Howard scheduled to start as Texas hosts Los Angeles
Los Angeles Angels (54-54, fourth in the AL West) vs. Texas Rangers (39-69, fifth in the AL West)