Barrett's offense and the Knicks' defense changed the game after the Hornets scored 66 points in the first half. New York held Charlotte to just 31 after halftime.
Derrick Rose and Immanuel Quickley each scored 17 points off the bench for the Knicks, who moved into fifth place in the Eastern Conference. They bring their longest winning streak since winning eight straight in March 2014 into Wednesday's game against fourth-place Atlanta.
Coach Tom Thibodeau warned that his team can't afford to lose its focus.
"The important thing for us is not to get lost. You start looking into the playoffs (and) win streaks, you lose focus on getting ready for Atlanta," Thibodeau said. "That's where our focus has to be. We just go day-by-day, step-by-step, and if we're taking care of all the things we need to take care of, then all of the other stuff will take care of itself. And it's easy to get knocked off course. You can't do that."
Julius Randle and Reggie Bullock each had 16 points.
P.J. Washington scored 26 points and Terry Rozier had 21 for the Hornets, who have lost five of six.
Charlotte shook off a slow first quarter and took a 66-60 advantage at halftime, led by 24 points from Washington.
After shooting 26 for 46 from the field and 13 for 19 behind the 3-point line in the first half, the Hornets struggled in the second half, making 13 of 40 shots from the field and connecting on just 3 of their 20 3-point attempts.
Charlotte took only eight free throws attempts the entire game, making three.
"The goal is to get to the rim, to create offense for us downhill and our guys drove it tonight," Hornets coach James Borrego said. "Why we didn't get the free throw calls? I don't know."
New York, which had lost five straight games to the Hornets, opened the third quarter with a six straight points to tie it on a dunk by Nerlens Noel.
After Jalen McDaniels tied it at 69, New York went on an 19-8 run, capped by five straight points from Barrett to make it 88-77 with 2:36 left in the quarter.
A 7-0 run highlighted by Bullock's 3-pointer increased New York's lead to 102-90 with 6:40 left in the fourth quarter. Charlotte answered with five straight points to cut the lead to 102-95.
The Knicks then put the game out of reach with 3-pointer from Bullock and a jumper from Rose with 2:28 left in regulation.
New York pulled within a half-game of the Hawks.
"We just got to take it day-by-day, not to think ahead," Rose said. "Of course you want the first spot, but we got to take it every day, every practice, every shootaround.'
Hornets: Washington is the sixth Charlotte player in the last 25 seasons to score more than 20 points in the first half off the bench. … Malik Monk has 24 first-half points against Miami on March 26. … Miles Bridges had 15 points and 15 rebounds.
Knicks: Quickley scored all of his points in the first half. He was 4 for 7 behind the 3-point line. ... The Knicks made 18 3-pointers.
Borrego could not give a timeline as to when rookie LaMelo Ball will return to the lineup after fracturing his right wrist March 20 against the Los Angeles Clippers.
"Nothing is written in stone," Borrego said. "There's an opportunity to him back (now that) the cast is off."
The Hornets will look to see if the "flexibility" in Ball's wrist improves significantly now that he has been granted permission by the medical staff for individual basketball activity.
Ball, the their third pick in the 2020 draft, averaged 15.9 points, 6.1 assists and 5.9 rebounds in 41 games before he was injured.
"He's young and I'm hopeful that helps that that wrist gets back to normal. We have a little bit of time," Borrego said. "The No. 1 thing is it doesn't sound like he can injure this thing further."
Hornets: Visit the Chicago Bulls on Thursday night.
Knicks: Host the Atlanta Hawks on Wednesday night
(© Copyright 2021 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)
for more features.