The squamous-cell carcinoma is isolated to his upper jaw and has not spread to other parts of his body, Kelly said in a statement.
Surgery is scheduled for Friday. Kelly said doctors have described as "very good" his chances for recovery.
"With the excellent medical care that I will be receiving and the loving care of my wife Jill and my daughters Erin and Camryn and the support of my entire family and friends, I am extremely confident in my road to recovery," Kelly said.
The announcement came on the first day of the 27th annual golf tournament Kelly started to benefit his Hunter's Hope Foundation and other pediatric causes, the Bills noted on the team website.
The team said Kelly's statement "had a bit of irony in that a man that has given so much of his time and effort to advance the cause of universal newborn screening for the benefit of infants is now the one in need of support."
"Knowing Kelly's makeup as a player and a person, seeing the Hall of Famer beat the odds would be anything but surprising," the team said on its website.