It was the third fight in Las Vegas between the modern day greats with the second win coming after a controversial draw in the first fight.
All three judges scored the fight 116- 112, 115-113, and 115-113 for the boxer.
The Mexican thanked his friend for giving the fans three great fights.
Despite their rivalry turning sour, they had a warm embrace after the fight.
I would like to shake hands with him. Thanks to all of his teammates. If you don't understand that, you don't understand anything.
The last chapter did not have the same bite as the previous two contests.
The first round was dominated by Alvarez.
Steve Bunce on the Radio 5 Live commentary said that Golovkin was happy to see the rounds slip away, and at the halfway point of the fight, he was getting a blanking.
The pace was set by the man who was successful with his left hook.
After the eighth round, Golovkin's trainer tried to get him to work, telling him "let's go to work"
The 40-year-old tried to do that and staged a fightback from the ninth round onwards, his famous stiff jab finally clicking into gear.
Going into the final round, Golovkin was looking for what would have been the 38th knockout of a long career, but he wasn't able to find it.
The T-Mobile Arena in Las Vegas had been an unhappy hunting ground for Golovkin, losing the second fight to Alvarez there and being robbed of what many felt was a great win in their first fight.
It was another frustrating night for Golovkin, who lost for the second time in his illustrious 45 fight career.
Should Golovkin lose, many thought he would quit the sport.
He said he had no intention of hanging up his gloves after he was promised a knockout victory by the other side.
For the first time in his career, Golovkin is fighting in the super-middleweight division.
When asked if he would keep fighting, Golovkin said absolutely. I have a good plan. A big thank you to all boxing fans. I have three belts in 160 lbs and I come back.
After his move up to light-weight ended in a loss, he returned to winning ways.
He lost for the second time in his career, but the Mexican said his next goal is to avenge that defeat.
Bivol will defend his title against Gilberto Ramirez.
He will look to fight Bivol on his return after he recovers from his hand injury.
Everything was in there. He said that he needed surgery on his hand.
Bivol is the fight I want, everybody knows that. What will happen in that fight? I need to take a break.
It's important for my family and my country. I will win the match.