The 32-year-old scored three goals in 22 appearances after joining Southampton in October, making an emotional return to his boyhood club after nearly 15 years.
Walcott became the youngest player to feature for Southampton when he made his first-team debut in August 2005, at only 16 years and 143 days. His instant impact at St Mary's helped him secure a move to Arsenal five months later. He joined Everton in January 2018 after 12 years in north London.
"Southampton is a club that means so much to me and it has been incredibly special for me to have spent this season back at St Mary's," Walcott told the club,
"But to now have the opportunity to return for a further two years means such a great deal to me, both personally and professionally."
Southampton, 14th on the standings on 43 points, host Leeds United later on Tuesday.