The 30-year-old, who currently plays for CF Montreal in the Major League Soccer, had been with the national team since 2007.
Wanyama amassed 64 caps for the Harambee Stars, scoring seven goals, but was overlooked for Kenya’s FIFA World Cup qualifying games earlier this month.
The former Tottenham Hotspur and Celtic midfielder also had his captaincy taken away by Jacob Mulee, who has since left his role as Kenya manager.
"Growing up, it was always my dream to get the chance to represent my country. With a great deal of pride, I can say that I have been fortunate to live my dream!" Wanyama said in a statement.
"From making my debut against Nigeria to captaining the team at the African Cup of Nations finals in Egypt, these past 14 years have gone beyond what I ever thought possible.
"We have shared great moments together, and I am proud to have been your captain and leader.
"But all good things must come to an end, and after long consideration, I have made the really difficult consideration to retire from international football.
"The time has come to hand it over to the next generation so that they can make their mark and help our country reach even greater heights.
"I hope to return one day to help the federation off the field, but until then, I will still be the Harambee Stars' biggest supporter and I will be cheering you guys from the sidelines."
"Thanks all for the support."