The fight ends immediate hopes of Mayweather facing Manny Pacquiao although there are still hopes that fight may be made in autumn, after Mayweather has served an 87-day prison sentence for a domestic violence conviction.
Mayweather's sentence was deferred by Las Vegas authorities in order for him to take on Cotto, who has held his current title since he was widely defeated on points by Pacquiao in 2009.
Cotto proved in his last fight, a revenge stoppage win over Antonio Margarito in December, that Pacquiao apart he represents the biggest threat to Mayweather's 42-fight unbeaten record.
Mayweather said: "Miguel Cotto is a world-class fighter who can never be taken for granted and continues to prove he is one of the best in boxing.
"It will be a challenge for me to compete with him at this weight, but this is the type of test I thrive on and gives me the motivation to train even harder. I have no doubt in my mind that my title belt collection will increase once again."
Mayweather last fought at the 154lbs limit when he outpointed Oscar De La Hoya in a disputed split decision in 2007. In his last fight in September he scored a controversial fourth round stoppage of Victor Ortiz.
Cotto said: "I am here to fight the biggest names in boxing. I've never ducked anyone or any challenge in front of me. That is what the sport of boxing is all about. On May 5 I will convincingly beat Floyd Mayweather."