The surgery was done to remove a bursitis on the knee -- inflammation of the fluid-filled sac that lies between a tendon and skin or between a tendon and bone -- that Willis suffered early in the week during Pro Bowl practice in late January. The injury caused Willis to withdraw from the all-star game.
The 49ers said the surgery, considered minor and done about a week ago, was performed by Dr. Tim McAdams and Dr. Gary Fanton at Stanford Hospitals and Clinics in nearby Redwood City, Calif.
Team spokesman Bob Lange said there's no infection and no structural damage to Willis' knee. The 49ers will not put a timetable on Willis' return, but he isn't expected to be sidelined for long. The team will adjust Willis' offseason conditioning and regimen as he rehabilitates.
Willis is coming off a 2009 season in which, for the second time in his three-year career, he led the NFL in tackles, this time with 152.
The Associated Press contributed to this report.