The Reds vice-captain has remained an important member of Jurgen Klopp's squad since joining on a free transfer from Manchester City in 2015.
Milner told the club's official website he was delighted to extend his stay on Merseyside:
"I've been lucky and privileged to play for this club for four-and-a-half years now, it has been an amazing time seeing how the club is changing and developing.
"I just enjoy coming into training every day, working with this group of players, this manager and coaching staff, and being part of this football club.
"We had discussions with the club, and this was obviously the ideal for me, this was what I wanted to do—stay and play at the highest level as long as I can."
James Pearce of The Athletic reported the length of the deal and praised the Reds for tying down the veteran:
The 33-year-old remains one of Klopp's most versatile options, providing coverage at full-back and in midfield.
Milner has primarily been used as a substitute this season, coming off the bench eight times during his 12 Premier League appearances.
The player also featured in the club's six UEFA Champions League group games this term, with Liverpool qualifying for the knockouts as Group E winners.
The announcement comes on the same day Klopp agreed a new deal to remain at Anfield until 2024.