3-6, 6-2 win over Federer Sunday, preventing the Swiss star from defending his title in Halle, Germany.
The defeat meant that Rafael Nadal will return to the top of the world rankings on Monday.
The 21-year-old Croat saved three of the four break points he faced and took his second match point to end Federer's 20-match winning streak on grass for his second career title. "It just didn't go my way", Federer said after the match, as per the Express.
The Croat earned his first ever victory over the 20-time grand slam victor, surviving a second set comeback to defeat Federer 7-6 (6), 3-6, 6-2 on the grass courts of the German city.
Federer dropped the opening set and won the second but was unable to fight back after going down 2-4 in the third.
The two star players have been in the top two spots of the rankings throughout 2018, with Federer in first for six weeks and Nadal in first for 16 weeks, including for June 25.
Federer was the aggressor in the second set, forcing Coric to save two breakpoints before he finally broke him and served out the set to love to usher in a decider. A game later, the Swiss seed took the set into a tiebreaker.
The 20-time Grand Slam champion fought back to level by winning the second set, helped by a choke on a volley from Coric.
Leading 5-3, Federer squared the match in the next game as Coric hit the net again.
Federer, who lifted the Stuttgart title last week, will be bidding for a record-extending ninth men's singles crown at Wimbledon, which begins on July 2.