A thoracotomy is surgery to open your chest. During this procedure, a surgeon makes an incision in the chest wall between your ribs, usually to operate on your lungs. Through this incision, the surgeon can remove part or all of a lung. Thoracotomy is often done to treat lung cancer. Sometimes it’s used to treat problems with your heart or other structures in your chest, such as your diaphragm. Thoracotomy can also be used to help diagnose disease. For example, it can enable a surgeon to remove a piece of tissue for further examination (biopsy).