Lyles (5-12) benefited from a trio of double-plays while giving up just four hits with a walk. He struck out three.
The 21-year-old right-hander also launched a solo shot in the fifth inning, joining Fernando Martinez, Jed Lowrie and Matt Dominguez in belting long balls.
Brewers starter Mike Fiers (9-10) struck out 10 over six innings but couldn't prevent Milwaukee from being officially eliminated from the National League playoff hunt.
Kim Kardashian, Kanye West reportedly set wedding date
NBC reportedly holds celebs hostage to Jimmy Fallon's show