"He's a guy who's continued to make pitches when he needs to," Padres manager Bud Black said.
"I've talked about it before: He knows how to navigate his way through a Major League game."
Will Venable hit a home run in the seventh to provide some breathing room for the Padres, winners of three in a row and five of their last seven games, all against teams over .500.
The Cardinals have the best record in the National League at 28-16, but since April 24 they are tied with the Padres at 16-8 for the best record in the NL.
The Padres are now 21-23.
"It's good baseball all the way around," Venable said. "Good defense, outstanding pitching, timely hitting. For whatever reason it took us a while to get going. But this is what we envisioned with these guys."
Marquis lasted six innings allowing two runs, one earned, on three hits to improve his record to 6-2 in his career against the Cardinals, one of his many former teams.
"I felt I had a lot of my pitches working tonight," Marquis said. "From the second on, I felt pretty good. I felt I had good command of my sinker and that it had good depth to it. All in all, I felt like I did what I wanted to do. And once again, the defense did a great job."
His performance came against Cardinals manager Mike Matheny, Marquis' former battery mate, who spoke highly pregame of how Marquis has changed as a pitcher since their playing days together.
"He's a guy who is going to challenge you," Matheny said. "I think he's just gotten stronger as he's gone in his career. He's got one of the better sinkers in the game. He knows how to use it. He knows how to be smart with it."
His victory came over Cardinals rookie pitcher Shelby Miller (5-3), who came into the game with a 1.40 ERA. Miller has struggled at times with his high pitch totals, which have prevented him from going deep into games. It took him 107 pitches to get through 5 2/3 innings while allowing three runs -- tying a career high (April 28 vs. Pittsburgh) -- on five hits with five strikeouts.
The Padres struck early on Miller, as Chase Headley drove in Everth Cabrera with a single to right field in the first and then got to him again before he left the game in the sixth inning. Miller would leave the game after two walks, both of which would come around to score, as the Cardinals bullpen couldn't hold the lead.
"The two walks at the end killed me," Miller said. "... It's just disappointing that I've done it in back-to-back starts, going five and getting two outs. I have to finish those kinds of situations."
"He's got a bright future, he's got a good arm," Black said. "But I still liked the way our guys attacked him and we broke through against him."
The Cardinals would score an unearned run in the second inning and a run on a double play in the third after a leadoff double by Carlos Beltran, but that would be all.
The Padres bullpen pitched three scoreless innings against the Cardinals, capped off in the ninth by closer Huston Street to record his 11th save of the season.
San Diego improved to 3-2 on this seven-game homestand against two teams (also Washington) thought to be postseason contenders. The Padres are now 12-3 in their last 15 games at Petco Park.
"We're playing well in all facets," Black said. "We've talked about it, got to keep it going."