The Cardinals ran their winning streak to four games while getting another strong outing from starter Lance Lynn.
Lynn (4-0) ran his scoreless inning streak to 15 before Pedro Alvarez drove in the only Pittsburgh run with a sacrifice fly in the sixth. Lynn gave up just two hits and struck out nine, winning his ninth consecutive decision since Sept. 7, when he suffered a setback in relief against Milwaukee.
Matt Carpenter and Beltran both hit a home run off Jonathan Sanchez to open the St. Louis first. Sanchez (0-3) hit Allen Craig in the helmet with a pitch in the first inning and was ejected along with Pittsburgh Manager Clint Hurdle.
Beltran hit a two-run homer in the fifth and St. Louis tacked on a four-run eighth that included a two-run single from Craig.
Pittsburgh had won three in a row.