General manager Darcy Regier says Mair will miss at least six weeks. That means the gritty fourth-line player will be out until after the Sabres open the regular season on Oct. 3 against Montreal.
Regier did not provide any details Tuesday as to why the operation was necessary.
The announcement came a week before the Sabres are scheduled to open training camp. Mair is a 10-year NHL veteran, who has spent the past six seasons with Buffalo.
He scored a career-best eight goals and added 11 assists for 19 points in 75 games last season.