The Leeds United player featured for 19 minutes as a substitute in Switzerland's last-32 defeat by Algeria at the World Cup, taking his tally to 26 international appearances.
However, the 26-year-old said his limited minutes did not influence his decision, which he stressed stemmed from the way he had been treated.
"My decision has nothing to do with my playing time.
"Things happened that hurt me deeply. Trust was broken. Commitments were not kept. And when I was allowed to play against Algeria, people reacted to minor mistakes far away from our goal in a way that hurt me deeply.
"In the weeks that followed, I thought a lot and decided for myself that I no longer want to play for the national team under the current manager," Okafor said in a statement on Instagram.
The Swiss FA acknowledged Okafor's decision.
"Noah informed us today that, for the time being, he will no longer play for the national team. We respect his decision and wish him every success with his club," said a spokesperson.
