The 23-year-old, Ulster's Player of the Year, made his international debut for Ireland in the Six Nations game against England at Twickenham in February.
McCloskey still had a year remaining on his previous contract but had no hesitation in signing a long-term deal.
"I grew up in Ulster and it was always a dream to wear the jersey," he said.
"Despite some strong interest from other clubs, it was a fairly straightforward decision since all of my family and friends are here.
"The supporters, the facilities we have and the quality of the coaching were all factors in my decision.
"We had a disappointing finish to the season but I believe things are promising for the future and I'm excited to be part of that."
McCloskey has accumulated 42 appearances, scoring five tries, since making his debut for the province in February 2014 as a replacement in the Pro12 fixture against the Dragons.
Ulster Director of Rugby Les Kiss described McCloskey's expressed delight at McCloskey's decision to extend his stay.
"Stuart has been one of our standout performers all season. A major strength of his is his gain-line busting runs, which we used to great effect this season.
"In addition to his powerful carrying ability, his deft handling and decoy lines have also caused havoc for defences."
Ulster centre Stuart McCloskey has signed a contract extension which will see him remain at Kingspan Stadium until the summer of 2019.