St. Louis (57-51) acquired John Lackey from Boston for starter Joe Kelly and outfielder Allen Craig on Thursday, one day after it picked up Masterson from Cleveland for a prospect. Lackey is scheduled to start Sunday's series finale.
A season after recording a career-high 14 wins and earning an All-Star nod, Masterson went 4-6 with a 5.51 ERA in 19 starts for the Indians this year.
''Yes, the numbers don't quite look the same as what they looked last year, but we're talking a year ago," Cardinals manager Mike Matheny said. "Still, good movement, he's able to attack the strike zone. We can see there's a lot of potential here to help us out.''
A free agent at the end of the season, Masterson's time in St. Louis could be limited if he doesn't improve now that he's back on the mound for the first time since going on the disabled list July 8 with knee inflammation. He went 0-2 with a 9.50 ERA in his last five starts, and yielded 13 runs, 20 hits and 10 walks over nine innings in the last three.
"If we have an opportunity here to put our best foot forward, we'll see how we can help him," Matheny told MLB's official website.
"Hopefully it brings out the best."
Masterson makes his first appearance versus Milwaukee (61-49), which didn't make nearly as big a deadline splash as the Cardinals but has a three-game advantage over third-place St. Louis following Friday's 7-4 victory.
Outfielder Gerardo Parra, whom Milwaukee acquired from Arizona for two prospects Thursday and is 2 for 3 versus Masterson, could start after coming off the bench and striking out in his only at-bat Friday.
''With St. Louis, it was a great pickup for those two guys,'' Brewers manager Ron Roenicke said. ''Saying that, I know (Milwaukee general manager) Doug (Melvin) was on the phone making calls and I know what people were asking for in return, and for me it didn't make sense."
Aramis Ramirez homered for one of his three hits and had two RBIs for the Brewers, who handed St. Louis its seventh loss in 10 games by improving to 3-1 this season at Busch Stadium. The Cardinals have been outscored 21-9 during their four-game home slide.
Ramirez is batting .414 with two home runs and seven RBIs in eight games versus St. Louis this season.
Ex-Cardinal Kyle Lohse (11-5, 3.07 ERA) is 2-1 with a 1.83 ERA since posting a 4.85 ERA and dropping his last two starts prior to the All-Star break. He allowed two runs in six innings of a 2-1 loss at Tampa Bay on Monday.
The right-hander is 1-3 with a 4.80 ERA in five starts against the Cardinals since signing with Milwaukee last March.
Matt Holliday is 3 for his last 14 with a home run versus Lohse, but is batting .389 with two homers in four home games versus Milwaukee in 2014.
Teammate Matt Carpenter is batting .417 with seven RBIs in nine games, but is 1 for 11 against Lohse.
Milwaukee's Lyle Overbay is 1 for 16 in his last nine, but 6 for 11 with two walks versus Masterson.