Elliott, 19, arrived from Fulham in 2019 for a fee ruled by a tribunal to be up to £4.3 million. He has since made 22 appearances for Jurgen Klopp's side.
- ESPN+ viewers' guide: LaLiga, Bundesliga, MLS, FA Cup, more
- Don't have ESPN? Get instant access
"It's always nice to know that I'm going to be here for many more years, which is always a great thing with it being my boyhood club and there is nothing in this world that makes me more happy and more excited than this," Elliott told Liverpool's website.
The midfielder only signed his previous deal in July 2021 following a season-long loan at Blackburn Rovers. He looked set for a major breakthrough after earning rave reviews as he started three of Liverpool's first four Premier League fixtures last season.
However, he suffered a fracture dislocation of his left ankle against Leeds United in September that sidelined him for five months. After returning to action at the end of last season, Elliott has appeared off the bench in both of Liverpool's fixtures so far this season -- against Manchester City in the Community Shield and last week's opening Premier League draw with Fulham.
"It's been a big rollercoaster for me and my family and even for the club. So much has happened in the years that I have been here," Elliott added.
"We've already won so much and hopefully we can win so much more, so just to know that I am going to be here for a long time again -- as I said, it's always a wonderful feeling for myself and my family [and] being Liverpool supporters there is no better place in this world to be than playing for Liverpool and to put the shirt on and go out and play for the team and the fans.
"I'm hoping there are many more memories to come with it but I'm just so excited to put pen to paper and stay here for a lot longer."
Klopp was full of praise for the England Under-21 international.
"There is so much to like about this," he told Liverpool's website. "For us, as a club, we get to continue our journey with a special young player who has already made a big impact on Liverpool FC.
"For Harvey, he gets to carry on developing, improving and hopefully fulfilling his incredible talent at the club he has always supported. What's not to like?
"Harvey got a big knock last season but, like all of the experiences he has had so far, he used it to grow as a person and a player."