The 29-year-old has scored 21 goals in 73 games for the Saints since joining from Hull for £12m in 2014.
Long played for the Republic of Ireland as they reached the last 16 of Euro 2016, but he failed to score in four appearances.
"I love it here, it's a real family feel, and I feel like I'm a big part of that," Long told the club's website.
Southampton striker Shane Long has signed a new four-year deal with the club until the summer of 2020.