撤职 is formal / official-administrative — it specifically means stripping someone of an official post (
政府,
党,
军队,
国企). For ordinary firing in a private company, use
解雇 (jiěgù) or
开除 (kāichú). The fixed phrase
撤职查办 ("dismiss and investigate") is a standard step in Chinese disciplinary procedure.