"can not work for their competitors" is determined by non-competition agreement signed before, if it was signed.
Not sure if it is up to "fire" or "quit".
Could you provide more details to support
If they fired you due to your faults, you can not work for their competitors.
?