Do I need to quit smoking before I have one lung removed because of cancer?

Yes. Being an active smoker increases your risk of post-operative complications after lung surgery, including pneumonia and blood clots. You should be completely off of cigarettes at least 2 weeks before surgery.
Yes. The biggest risk factor for developing lung cancer is smoking. In addition, smoking increases the risks of surgery. But even more important is to not restart smoking after you have recovered from your surgery.