Miguel Cabrera and Victor Martinez each drove in two runs as the Tigers earned a split of their four-game series with the American League West leaders.
Ian Kinsler doubled twice, scored twice and also drove in a run for the Tigers, who have won two of their past three games. Nick Castellanos also had two hits.
Closer Joe Nathan allowed two runs in the ninth, but he was able to retire pinch-hitter Jed Lowrie to escape a jam and secure the victory for his 13th save.
"When Joe is on, you're going to get quick outs," Tigers manager Brad Ausmus said. "He just wasn't today. I know he had kind of a rocky start, but he had a stretch where he pitched very well. The last couple of games he hasn't been vintage Joe Nathan. I'm sure it's not the way he wanted it to go, but he did save the game."
Porcello issued a career-high six walks during his 5 2/3 innings, but he got the big outs when necessary and held Oakland to just two runs on five hits. He also struck out four.
"They have a rare combination of guys who are aggressive and at the same time they will draw a lot of walks," Porcello said. "They don't swing at bad pitches very often. I got to a lot of three-ball counts and just didn't execute pitches when I was behind."
Porcello, who walked nine hitters through his first nine starts combined, was trying to make an adjustment with his arm slot.
"The ball was coming out of my hand good. I felt like I was missing, but I felt like I knew what I had to do to get back in the strike zone," he said. "At times I wasn't sure where my arm was."
Porcello had one clean inning; otherwise he was pitching with multiple runners on.
The A's loaded the bases in the second with no outs before Porcello got Eric Sogard to bite on a sinker and start a 1-2-3 double play.
"One of the better ones I've thrown," he said. "Came at the right time."
The A's had runners on first and third with nobody out in the fifth. Porcello struck out Josh Donaldson and got Brandon Moss on a foul pop to Castellanos before J.D. Martinez made the play of the game, catching Yoenis Cespedes' sinking line drive just off his shoelaces.
"The catch that J.D. made, to me, was really the game," Porcello said. "That was huge. For him to maintain his focus through the long innings that I was out there was huge. I can't say enough about that play."
Porcello got the first two outs of the sixth but then loaded the bases on two walks and a hit batsman before giving way to left-hander Ian Krol, who got pinch-hitter Derek Norris to foul out.
"We had a pretty good idea they were going to hit for [John] Jaso like they did the other day," Ausmus said. "Krol has to be able to get righties out as well, and he got the job done today."
Cabrera drove in a run in the third and fifth innings, giving the Tigers a lead both times. Martinez doubled home two runs in the seventh, which proved to be the margin.
"We had plenty opportunities," A's manager Bob Melvin said. "We had some situation at-bats where we didn't come through."
Al Albuquerque and Joba Chamberlain each threw a scoreless inning for the Tigers, who are heading to Seattle for a three-game series.