Wainwright (16-9) struck out eight, passing Dizzy Dean for second place all-time among Cardinals pitchers with 1,103. The right-hander issued two walks while placing 68-of-100 pitches for strikes.
David Freese socked a solo homer and added an RBI single for the Cardinals. Matt Holliday, Pete Kozma and David Descalso each drove in a run for St. Louis, which took a second straight from division rival Pittsburgh and vaulted over them by one-half game atop the National League Central.
Pirates starter Jeff Locke (9-5) allowed three runs (two earned) on three hits in five innings.