Mayweather has a contractual obligation to fight on that date at the MGM Grand in Las Vegas, and had challenged Pacquiao to a fight in January. A fight between Mayweather and Pacquiao could be the richest in boxing's history, but has never been staged.
"I'm fighting Miguel Cotto on May 5th because Miss Pac Man is ducking me," Mayweather posted on his Twitter account Wednesday.
Mayweather, who turns 35 later this month, is 42-0 with 26 knockouts in his 15-year career. Pacquiao is an eight-division champion.
Mayweather was granted the chance to fight in May after his sentence for a domestic violence conviction was postponed. He received his jail term after striking a plea deal in December to avoid felony charges stemming from a domestic dispute with his former girlfriend and their two children in 2010.
He pleaded guilty to one count of battery-domestic violence and no contest to two counts of harassment.
Mayweather last fought on September 17, when he scored a fourth-round knockout of Victor Ortiz. He has never fought the 31-year-old Cotto, who is 37-2 in his career with 30 knockouts. One of his losses was to Pacquiao in November 2009.
Cotto last fought on December 3, when he beat Antonio Margarito in the 10th round.