Carmelo Anthony's trey with 19.4 seconds left had pulled the Knicks into a 98-98 tie, but the Bucks answered on the next possession.
Knight held onto the ball to run off the clock, then nailed his decisive shot with 2.3 seconds remaining. He finished with 25 points as Milwaukee bested New York for the first time in eight meetings.
Khris Middleton put in 19 points and Giannis Antetokounmpo came off the bench for 15.
Anthony scored 17 of his 36 points in the fourth quarter for the Knicks.
J.R. Smith poured in 30, including six 3-pointers.