Two judges scored the fight 117-111, with the third awarding it 119-109 all for Trout, known as 'no doubt', with Cotto's face left bruised and swollen after the contest.
"Miguel Cotto is a great champion. It's just an honour to be in the same ring with him. To have my hand raised with a kingpin like Cotto is a dream come true," Trout said from the ring after the win.
The taller Trout 26-0 (14 KOs) started the bout confidently, keeping Cotto at bay with a long southpaw jab and fluid left hand punches to the body.
By the third, however, Cotto began to close the distance and forced Trout to retreat, backing him up against the ropes and digging to the body and head with left hooks.
After five rounds, the challenger, coming off an exciting points decision loss to Floyd Mayweather Jr in Las Vegas in May, seemed to be growing more comfortable, confidently walking Trout down and blocking his opponent's punches with his gloves.
At the midway point of the contest, Trout, who entered the contest as the underdog against a man whose 20 most recent fights had all been world title bouts, once again discovered his rhythm.
He returned to peppering Cotto, 37-4 (30 KOs), with jabs and combinations and limited his opponent's ability to land punches inside by tying him up whenever the Puerto Rican was in close range.
By the end of the contest, except for a few rallies when the two men exchanged combinations, Cotto was in retreat, his face swollen and he accepted the result at the final bell.
"If I agree or not, it was the decision," he said. Asked if he would fight again, he said, "Probably," before leaving the ring and walking back to the dressing room.