The International Olympic Committee says confidential financial terms of the immediate separation were agreed to.
IOC marketing director Timo Lumme says "we understand that McDonald's is looking to focus on different business priorities."
McDonald's was among 13 top-tier sponsors signed through the 2018 Pyeongchang Winter Olympics and 2020 Tokyo Games.
An Olympic sponsor since 1976, McDonald's had signed an eight-year extension to run through 2020.
McDonald's had exclusive rights in the "retail food services" sponsor category.
The IOC says it will review the sales categories rather than sign a direct replacement.
McDonald's remains a national sponsor of the 2018 Olympics with domestic marketing rights in South Korea.