Josh Hader pitched a perfect ninth inning, retiring Brandon Nimmo on a game-ending flyout to left fielder Christian Yelich and sending the Brewers running onto the field to celebrate as the crowd of 43,430 erupted into cheers.
"It's a great accomplishment for this organization, for this team," Hader said. "We had a lot of ups and downs, but that's part of this baseball team. Each one of these guys, they fight for each other. That's what it's about."
Brewers manager Craig Counsell often describes the team as resilient.
"We never give up," Hader said. "Think about this week. We got swept by the Cardinals and turned around and swept the Mets. That's what it comes down to, not getting down on ourselves and continue to play at the level we can."
The Brewers are 94-62, winning 90-plus games for the ninth time in franchise history.
"We gave ourselves an opportunity to get it done today," Counsell said. "That's because we played a great series this weekend. It's a roller coaster always, but you get up in the 90s in in wins, that means you're doing it all year long."
Milwaukee sent the Mets (73-82) skidding to their 10th loss in 11 games. They are on their third five-game losing streak and were swept for the 10th time this season.
A day after New York was eliminated from postseason contention in their first season under new owner Steven Cohen, the Mets (73-82) made three errors and were assured of a losing season for the fourth time in five years.
Milwaukee, which also won the NL Central in 2011 and '18, already was assured of its fourth straight postseason berth. After losing at the wild card stage in 2019 and '20, the Brewers will rest after the end of the regular season before starting the Division Series on Oct. 8.
Yelich was thrilled with being able to celebrate at home and with fans in the stands after last season's COVID restrictions prevented any fans.
"It's awesome," he said. "Compared to last year, we made the playoffs, but we weren't allowed to do any of this stuff."
Freddy Peralta (10-5) won for the first time since Aug. 10, ending a skid in which he went 0-2 in five starts. He allowed four runs and five hits in 5 1/3 innings.
Peralta entered with a .162 opponents batting average, on track to be the best since 1920.
Carlos Carrasco (1-4) gave up five runs, seven hits and four walks in four innings.
New York, in its second season under manager Luis Rojas, led the NL East for 90 days but is 17-34 since the start of August.
A day after striking out four times, Francisco Lindor hit his 18th homer in the first. It was the fourth first-inning home run allowed by Peralta in his last five starts.
Kolten Wong walked leading off the bottom half and Adames hit a 424-foot drive for his 24th homer.
Milwaukee opened a 5-1 lead in the second when Yelich hit an RBI groundout and Eduardo Escobar hit a two-run double.
Javier Báez hit a two-run double in the fourth. Lindor's 10th error of the season led to two runs in the sixth, and Alonso contributed a misplay at first.
"We're happy that we accomplished this first step, but we know we have a long way to go now," Adames said. "We have to continue to compete."