His illness forced him to quit smoking.

Literal

Illness [because-のため] he [topic-は] cigarettes [object-を] unavoidably quit.

やむなく ('unavoidably, reluctantly') adds nuance — he didn't want to quit but had no choice. タバコをやめる is 'to quit smoking.' The sentence implies a silver lining to illness.