It is Liverpool's first defeat in the competition this season but their 2-0 win at the San Siro last month was enough to seal their place in the final eight.
- ESPN+ viewers' guide: LaLiga, Bundesliga, MLS, FA Cup, more
- Don't have ESPN? Get instant access
- Ratings: 5/10 Salah forgets goal-scoring touch in Inter loss
Jurgen Klopp's side can now turn their attention to the Premier League with fixtures against Brighton and Arsenal to come in quick succession.
"The difficulties we had were pretty close to what I expected," Klopp told BT Sport after the game. "Inter are a really, really good side, set up for these kind of games.
"Without playing brilliantly we had clear-cut chances. Over the two legs it's completely fine that they won one and we went through. We could've done better against an opponent that makes life uncomfortable.
"It was a really interesting game. In the end we lost the game which obviously is not cool, we didn't come here to lose a home game."
The first half was a tight affair with Inter edging the early stages as they pressed for an early goal but failed to create any clear-cut opportunity.
The game was stopped after 25 minutes when Liverpool supporters in the Kop stand alerted the referee and players to a medical emergency.
The match resumed and moments later, Liverpool almost took the lead on the night but Joel Matip's header rattled off the crossbar.
The hosts hit the woodwork again shortly after the break when Mohamed Salah's close-range effort struck the bottom of the post.
Just after the hour mark, Inter silenced Anfield as Martinez hit a stunning strike from outside of the box that arrowed into the top corner.
Inter's momentum was immediately halted seconds later when Sanchez received a second yellow card and the visitors were reduced to 10 men.
Liverpool started to dominate possession after the sending off and hit the woodwork for a third time after Salah's effort struck the post.
Liverpool have now reached the last eight of the Champions League for the fourth time in the last five seasons.
"A difficult team -- in the away game we managed to win and the most important thing is we qualified," Salah told BT Sport in a postmatch interview.
"I hit the post twice. It's OK -- maybe in the next game I will score three. We lost the game and maybe that will give us a push and it's a good game to learn from.
"Everyone wants to win the Champions League and the Premier League and we will fight for both so let's see."