May 24, 2017 0924 GMT
Jacobs, known as "Miracle Man" since coming back from bone cancer five years ago, ended the unbeaten Golovkin's streak of 23 knockouts in a row in a battle that went to the scorecards for the first time since 2008 for the Kazakh champion.
Two judges scored it 115-112, with the third making it 114-113 in favor of Golovkin, who retained his WBC, WBA, IBF and IBO middleweight crowns.
Golovkin knocked Jacobs down in the fourth with a double dose of rights, but as the fight wore on Jacobs confused the Kazakh by sliding into a southpaw stance, scoring on stinging combinations, holding his own against the dangerous power of the champion, Reuters reported.
After a cautious, feeling out in the first two rounds, the bout blossomed into a fascinating battle with the fighters engaging freely in a thrilling duel to the finish that almost produced another Jacobs' miracle.
Golovkin improved his record to 37-0, while Brooklyn native Jacobs dropped to 32-2.
"I respect Danny Jacobs and very good job and clean job," Golovkin, who used a stinging left jab to set up his power shots, said in the ring after the decision. "Danny Jacobs is my favorite fighter. Clean, good quality, very good fighter."
Jacobs proved to be the toughest test yet for Golovkin, matching exchanges, using his bigger body to advantage and firing off big combinations against the tiring champion late in the bout.
The American thought he had taken the decision.
"I think I won the fight," the New Yorker said. "I think I won by two rounds at least.
"They want the big fight, and Daniel Jacobs got X'd out. I won the fight and I won the decision and all I can do is be gracious in the decision."
Jacobs said he stood right up to Golovkin after hitting the canvas early in the bout.
"After the knockdown I told him (he) had to kill me (to beat me)," said Jacobs. "When I got up I thought this is all he has? There were many times during the fight I went toe-to-toe because I knew I could."