Matthews had 26 points, including a key 3-pointer in overtime, and Portland withstood the tenacious Bucks 120-115 on Tuesday night.
"We put ourselves there," Matthews said about the threat from Milwaukee. "But we got ourselves out."
Robin Lopez added 15 points and 14 rebounds for the Blazers, who had been in a funk with losses in five of their past six games. Portland (44-24) has also struggled with the absence of injured forward LaMarcus Aldridge.
The Blazers pulled it out with a surge in overtime. The team's 22 points in the extra period was a franchise record.
Despite the worst record in the NBA, the Bucks gave the Blazers trouble for most of the game. There were 23 lead changes in regulation, and neither team was able to pull ahead by double digits.
"We could have come and laid down -- our record is our record -- but we kept fighting and we'll continue to fight and try to grow as a team," Sessions said.
Sessions, acquired by the Bucks at the trade deadline, had a chance to win it with a jumper at the buzzer, but he was off and the game went to overtime tied at 98.
Matthews' basket and layup put Portland back in front before Lillard dunked and hit a long jumper to make it 109-103. Middleton's pull-up jumper closed the gap for the Bucks, until Mathews' 3 made it 112-105.
Middleton added another jumper with just over a minute to go but Milwaukee couldn't catch up.
"Since the trade deadline, they've been a pretty good offensive team," Matthews said, "but that doesn't excuse us. We've got to come out with more urgency."
Mo Williams had a season-high 23 points off the bench for Portland and Lillard, who got off to a slow start, had 20 points -- 15 of which came in the fourth quarter and overtime.
Lillard said that perhaps the Blazers were overconfident going into the game because of Milwaukee's rough season.
"There's nothing wrong with going into the game thinking you're going to win," Lillard said. "But that's an NBA team over there."
The Blazers, who sit in fifth in the Western Conference, were without Aldridge for the third consecutive game because of a lower-back contusion. He is also likely to miss Thursday's game at home against Washington.
Portland led 52-47 at the half but Milwaukee kept up and narrowed it to 67-66 on Knight's short jumper before going ahead on Giannis Antetokounmp's basket. Sessions' short jumper extended the lead.
The Blazers led 75-72 going into the final quarter but Sessions made back-to-back jumpers to give the Bucks an 84-81 lead with 8:11 left. Matthews answered with a 3-pointer for the Blazers, before Lopez scored on a layup and a free throw to give Portland an 87-84 advantage.
Lillard hit a 3-pointer that gave the Blazers a 96-92 lead with 1:58 left. After free throws from Knight, Ersan Ilyasove made a layup to even the score at 96 with 48 seconds to go.
Lopez appeared to tip in a shot, but the basket was waived off as boos filled the Moda Center. Sessions missed two of four free throws before Lillard's layup tied it again at 98 with 4.9 seconds on the clock.
"The guys played really hard for four quarters, even in overtime," Bucks coach Larry Drew said. "I thought we did some really good things. I told them after the game I was really proud of their effort."
The Blazers downed the Bucks 91-82 in Milwaukee on Nov. 20. That snapped a four-game Milwaukee winning streak in the series. ... Portland coach Terry Stotts was head coach of the Bucks from 2005-07. ... O.J. Mayo did not play for the fifth consecutive game for the Bucks. ... The 22 points in overtime surpassed Portland's franchise record of 19 reached twice. ... Lillard's 18th point in the game was his 3,000 in 150 career games as a Blazer. ... Nicolas Batum finished with 21 points, 9 rebounds and 9 assists for the Blazers.