The 32-year-old was set to become a free agent later this month but will now be staying at Anfield to help Liverpool wrap up their first league title in 30 years before he leaves.
Lallana has played 15 times in the top flight this season, with his only goal coming in the 1-1 draw at Manchester United back in October.
He joined the Reds from Southampton in the summer of 2014 and has won the UEFA Champions League, UEFA Super Cup and FIFA Club World Cup during his time at Liverpool.
"I am really pleased to have the chance to finish this season – it means a lot to me and my family," he told the club's website.
"Of course, one of the big personal positives about committing to this short-term extension is that I will now get to say goodbye to the people who mean so much to me in the right way.
"The gaffer has been different class and we've had an honest conversation about what my role will be in the remaining weeks. I want to contribute in the most positive way possible that helps him and the team, not just for the remaining matches of this season – but also what they'll need to consider for next.
"I'm totally at peace with what that looks and feels like, and I know the role I'll be playing for this team will help in what's going to be an extraordinary period – the likes of which none of us have ever experienced.
"I feel in my time at Liverpool I've always looked to do the right thing for the team, the manager and the club in every decision I've made. I think this one fits into that category as well, so I'm buzzing to be seeing out this campaign and hopefully get to celebrate something memorable with an amazing group of people."
Lallana has been tipped to re-unite with former Liverpool boss Brendan Rodgers at Leicester City at the end of his contract.