St. Louis won its fifth consecutive game to maintain a one-game lead over Pittsburgh and a three-game advantage on Cincinnati in the NL Central. The Pirates finished a three-game sweep at Texas and the Reds knocked off the Chicago Cubs earlier in the day.
Lynn went six innings and gave up an unearned run on five hits.
"Yeah, but it's only one game," he said. "You still got to get ready for the next one and try to improve off of tonight. There were a couple of mistakes I made and they went for hits and I walked a few guys, you don't want to do that ever.
"But tonight was a good building block going down the stretch here and get myself right for this team in this run we're trying to make."
He also struck out 10, the third time this season he's reached double digits and the sixth time in 61 starts. The effort marked the first since May 24 that Lynn didn't allow an earned run, a stretch of 20 games.
Lynn lost his previous five decisions leading into Wednesday's game as his ERA rose to 4.37 from 3.78. He last win came Aug. 4, when he gave up two runs in eight innings in a 15-2 victory at Cincinnati.
Brandon Kintzler (3-2) gave up three runs on two hits and a walk while only getting two outs. He surrendered a game-tying hit in the seventh before loading the bases with one out in the eighth.
Carlos Beltran's sacrifice fly off Michael Gonzalez scored Matt Carpenter to give the Cardinals a 2-1 lead. An error by catcher Jonathan Lucroy allowed Jon Jay to score and Adams followed with his 12th homer of the season.
Trevor Rosenthal (2-3) had a hitless eighth inning for the win.
"I'm frustrated," Milwaukee manager Ron Roenicke said. "I'm tired of getting leads and just giving them away. We've got to win some of these games where we get leads."
Lynn said the biggest difference between his game against the Brewers and his previous six starts was that "he got a lot of people out." Manager Mike Matheny offered a more cerebral response.
"This was much more like we expect Lance to be like," Matheny said. "Really controlling, not letting things get out of hand when things started going in a bad direction, he refocused."
Lynn allowed a hit in each of the first five innings but got hurt most because of one of his two walks in the second. His one-out pass of Scooter Gennett pushed Carlos Gomez to second. On a successful double steal, Gomez came home when Tony Cruz's attempt to get Gennett bounced into centerfield.
"After the third inning, I knew that I had really good stuff," Lynn said. "The first couple of innings, you're trying to make sure you're kind of mixing in some pitches and getting some things set up for later on. After that, I was ready to go."
It marked the third loss in five games for Milwaukee.
The Cardinals broke through on an RBI hit from David Descalso. Matt Holliday led off with a single, the second hit against starter Marco Estrada, and moved to second on a two-out walk to David Freese. Descalso sent Kintzler's second pitch down the left field line to score Holliday and tie the game at 1-1.
Estrada took a no-hitter into the sixth, losing it with two outs. Carpenter, who struck out in his first two at-bats, hit a liner that bounced just in front of the pitcher, nicked his leg and bounded to third baseman Aramis Ramirez. His throw pulled Juan Francisco off first base in what otherwise would have been a close play.
"It's always frustrating to lose against any team," said Estrada, who left with a 1-0 lead. "But you come in here, play your butts off. You're in the game and the next thing you know, you're down."
Estrada gave up two hits in 6 2/3, struck out six and walked two. He's made six starts since returning in early August from the disabled list with a strained hamstring and has gone 2-0 with a 2.39 ERA in that span.
St. Louis C Yadier Molina missed the game for "family matters," according to Matheny. The Cardinals did not elaborate on the reason or say when the All-Star catcher would return to the team. ... St. Louis distributed 7,906 complimentary tickets to first responders and military personnel in honor of Sept. 11. ... Tyler Thornburg (1-1, 2.08) is scheduled to start for Milwaukee in the finale of the three-game set Thursday and will face Joe Kelly (8-3, 2.74). Kelly has won his past five starts. ... Hockey great Wayne Gretzky watched the game from the front row.