"From the side it looked like a Wiffle Ball, like playing in your backyard and the ball is just doing all kinds of weird things," Tampa Bay manager Joe Maddon said.
The Rays have lost four in a row after becoming just the fourth big league to reach .500 in the same season after dropping 18 games under the break-even mark.
Tampa Bay were shut out for the 15th time, most of any American League team.
Jake Odorizzi (9-10) gave up three runs while striking out seven in 6 2-3 innings. He had won five of his six preceding starts.
"Porcello was fantastic," he said.
Wil Myers, the reigning AL Rookie of the Year, went 0 for 3 as the designated hitter in his return to the Rays' lineup after missing 70 games because of a broken right wrist.
"I felt really good in the box, took some really good swings," Myers said. "It's just one of those games. I could have been coming into this game and been really hot, but the way he pitched I think the results would have been the same."
Porcello (14-8) moved into a tie for the league lead in wins, retiring 20 straight batters after Ben Zobrist's double in the first.
Porcello walked none and struck out four in his first win since Aug. 2. He matched Miami's Henderson Alvarez for the major league lead in shutouts.
Martinez hit his fourth career slam, connecting off Kirby Yates in the seventh inning, completing a five-run burst started by Rajai Davis' two-out double. It was the 24th homer of the season for Martinez.
Yates said he failed to elevate a fastball enough on an 1-2 pitch.
"I knew it was gone," Yates said. "Bottom line, I didn't execute to a great hitter. That's what he does."
Martinez drove in the Tigers' first run with a two-out double in the first after Miguel Cabrera's single. Cabrera also walked twice and scored two runs.
Tigers: RHP Justin Verlander (sore right shoulder) could rejoin the rotation Saturday after missing one start.
Rays: OF David DeJesus (broken left hand) resumed a rehab assignment with Single-A Charlotte. He had taken three days off due to soreness in the hand.
Former Rays ace David Price (12-8) will face his old team Thursday for the first time since being dealt to Detroit on July 31. Tampa Bay will counter with RHP Alex Cobb (8-6) in the finale of a three-game series. "I'm eager to see it," Maddon said. "We'll see how it plays out."
Rays pitchers have thrown 15 shutouts this season. Tampa Bay is the first AL team to have 15 shutouts on both sides since the Los Angeles Angels, Baltimore and Kansas City all did it in 1976.
OFF THE LINKS
Golfer John Daly, who resides in nearby Clearwater, threw the ceremonial first pitch.