“Friends, it has been a good run and I have enjoyed every moment. It’s been an honor coaching the SuperEagles. It is however time to bow out,” he posted on his official twitter page.
He told the post match press conference after the defeat in Brasilia: “It’s time for me to go back to my family and face fresh challenges.”
The 52-year-old is reported to be close to becoming the new manager of South Africa.
Asked about his next job move before Nigeria’s closing first round game against Argentina he replied: “I’ve had a lot of interest from other countries, South Africa is one of them.
“I cannot confirm it, I’m thinking now about this game, one of the most important in my career.”
Keshi, who captained his country at the 1994 World Cup, took charge of Nigeria in 2011.
Last year he masterminded their successful campaign to become continental champions at the 2013 Africa Cup of Nations in South Africa.
He tendered his resignation after that tournament but it was rejected by the Nigerian Football Federation.
Keshi paid tribute to his team captain, veteran defender Joseph Yobo, who has announced his retirement from international football after becoming the first Super Eagle to reach the 100 cap milestone.
“Congratulations to Joseph Yobo on his 100 caps,” he wrote on twitter.
“He has served Nigeria well. On his retirement, I wish him success in future endeavors.”