Surgery for osteomyelitis may include:  Taking a piece of the bone or pus to determine what bacteria or fungus is causing the infection. Draining pus or extra fluid caused by the infection. Removing dead bone and tissue. Placing a piece of bone or tissue from another part of the body.