Golovkin was forced to go 12 rounds as Jacobs gave the middleweight superstar all he could handle in front of a boisterous crowd of 19,000 at Madison Square Garden.
The Kazakh retained his WBC and WBO belts as two of boxing's pre-eminent punchers put on an entertaining show against the best opponents of their respective careers.
Golovkin said: "I couldn't destroy him. He is a very clean, very good fighter. It is my first test for 12 rounds. This is sport. I am a boxer, I am not a killer. I respect his game."
Judges Don Trella and Steve Weisfeld both scored the fight 115-112 and Max DeLuca had it 114-113 for Golovkin.
Jacobs was an underdog going in but he used his 10-pound weight and reach to his advantage and possibly provided the blueprint for Canelo Alvarez to use against the 35-year-old Kazakh in a future title fight.
Golovkin, who improved to 37-0, floored Jacobs early in the fourth round with two rapid fire overhand rights to record the only knockdown of the fight.
The Kazakh had won 33 of his previous 36 fights by knockout as his 23-fight knockout streak, which dated back nine years, came to a halt.
He has a 92 per cent knockout rate, the best ratio of any middleweight in boxing history.
Golovkin's IBF title was not on the line because Jacobs declined to attend the Saturday morning weigh in.
Jacobs needed to be within 10 pounds of Friday's official weigh-in weight or lose the chance to fight for the IBF title.
The 30-year-old Jacobs decided the extra weight in the ring was more important than fighting for all of Golovkin's titles and the gamble almost paid off. He dropped to 32-2, with 29 knockouts. "
At times I stood toe-to-toe with him to see what the power was like, what everybody was talking about, and it wasn't that bad," Jacobs said.
On the undercard, Thailand's Srisaket Sor Rungvisai captured the WBC super flyweight title with a stunning majority decision over unbeaten champion Roman Gonzalez.
Andy Lee returned to action for the first time since his defeat against Billy Joe Saunders in 2015.
Irishman Lee took a unanimous points victory over KeAndrae Leatherwood at the end of eight rounds in his 39th pro fight.