The 32-year-old, ever present in this season's league campaign, is now likely to miss England's friendlies against Ireland at Wembley on May 29 and away to Brazil on June 2.
"The captain's injury has progressively worsened in recent weeks and requires an operation to cure it," Liverpool said in a statement on their website.
Liverpool say he will be fit for pre-season training ahead of the new campaign.
The midfielder, who is due to have a testimonial match against Greek champions Olympiakos at Anfield on August 3, has scored nine league goals this season.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.