Commenting on his decision to leave Ulster, Afoa said: "It is good to have my long-term future sorted out, however I still have a lot of rugby to play with Ulster.
"I have six months remaining on my contract with the province and I am focused on helping the guys win something this season.
"When I finish my career, I will reflect on my time at Ravenhill with a lot of pride."
David Humphreys, Ulster's director of rugby, said: "John has made a fantastic contribution to Ulster Rugby in the two years that he has been here.
"He has been excellent for us on the pitch but has also been great for us off it, working along with Allen Clarke to develop the next generation of props for Ulster and Ireland.
"I know that with his wife and children in New Zealand it has been a challenge for John to balance the needs of rugby and family, but he has handled that situation with the utmost professionalism.
"When he leaves in June, everyone at Ulster Rugby will wish John well. Until that time however, I know that he will be fully committed to the province and I also know that he will now be even more determined to help Ulster be successful this season."