The palace said the operation on 91-year-old Prince Philip, which will take place on Friday, was pre-planned and comes after "abdominal investigations" that were carried out over the past week.
"He is in good spirits," said a spokesperson for the palace.
She declined to elaborate on Philip's condition or when the decision was made to operate, saying only that the queen's husband is expected to be in the London Clinic for up to two weeks.
The London Clinic, a private hospital and longtime favourite for celebrities and royals in need of treatment, declined to comment.