Best said: "I am pleased to have signed for a further two years. It is a massive honour to play for Ireland and Ulster. The support that I received when I missed out on the initial Lions squad was a massive factor in me making the decision to stay.
"That made me feel very special and underlined to me that Ulster is more than a team, it is a community and a rugby family. I want to keep playing for Ireland for as long as I can and to try and win a few more things in the green jersey."
Having been added to the Lions squad, Best appeared in four matches on the tour to Australia.
Ulster director of rugby David Humphreys added: "Rory Best is the cornerstone of the Ulster Rugby team and leads by example.
"You would struggle to find anyone who is more committed on the rugby field, nor someone who is more passionate about playing for his province.
"He has represented Ulster for the best part of a decade now and he has achieved some of the highest honours that the game has to offer. He will be a key player in our team as we continue to build and improve in the coming years and I am delighted that he has signed this new contract."