Buehler (7-5) pitched beyond the seventh inning for the first time and earned his first victory since Aug. 17. He retired the first 13 batters before Paul DeJong singled to left field. Harrison Bader singled later in the fifth for the Cardinals' only other hit.
Buehler struck out nine and walked two. In two career starts against St. Louis, he has not allowed a run and has 18 strikeouts in 15 innings.
The Dodgers and Cardinals are tied for the second NL wild-card position, four games behind Milwaukee for the top spot. Los Angeles entered 1 1/2 games behind first-place Colorado in the NL West.
Puig homered in the second off Jack Flaherty (8-7) and connected again in the ninth off Tyler Webb. It was his second multi-homer game of the season.