The 27-year-old Lyles is 2-4 with a 4.29 ERA in 24 appearances, including eight starts, this season.
"He's always had a really good arm. He's proven he has some versatility being able to throw out of the 'pen, and he's made some starts this year," Brewers general manager David Stearns said. "We think he adds to overall level of depth in our pitching staff right now."
Lyles, a former first-round pick of the Houston Astros, signed a one-year, $750,000 deal with the Padres to start the season. He has a $3.5 million team option left on his contract for 2019 with a $250,000 buyout.
"In August trade waivers, whenever you make a claim on the player you have to do so assuming you're going to get the player," Stearns said. "It didn't shock me that we were awarded the claim."
Milwaukee is extremely thin in its starting rotation with Brent Suter (left elbow) out for the season and Zach Davies (right shoulder) struggling to return from injury. Additionally, right-hander Jimmy Nelson has yet to return from a right shoulder injury that required surgery late last year.
San Diego manager Andy Green said Lyles had been working on changing his approach.
"In Jordan's case, he made some real fundamental changes this year with our pitching coaches and pitched himself in a situation where he's wanted at this time of year," Green said.
Stearns confirmed that Milwaukee's scouting department had taken notice of changes that Lyles had made - especially with the use of his secondary pitches. Milwaukee plans to add Lyles to the 25-man roster later this week.
"We're excited to get him here, and we're excited to get him going," Stearns said. "We think he's going to be a valuable member of this team going forward."
AP Sports Writer Jay Cohen contributed to this report from Chicago.