Jhonny Peralta smacked an RBI single in the sixth for St. Louis, which became the first team with 90 wins this season.
The Redbirds also increased their lead on the Pirates in the NL Central to three games. Kevin Siegrist earned the win in relief of Carlos Martinez, who struck out nine over eight innings of one-run ball. Trevor Rosenthal logged his 44th save.
Khris Davis hit a solo homer in the fifth for Milwaukee. Tyler Thornburg took the loss.