I was terminated because the employer went by the union contract regarding overtime.
But in the contract it states they must do two steps before enforcing, and they didn't do either.
Is my termination legal if they are using the contract to justify it if they themselves violated the contract?
Your question is rather unclear, but I will try my best to respond. First, you are a member of a union pursuant to a collective bargaining agreement between your employer and your union (as the exclusive bargaining representative of you and your co-workers). Your first step is to review pertinent provisions of the collective bargaining agreement ["CBA"] so that you have a clear understanding of it. You may wish to bring the CBA to an attorney for his or her review. Speak immediately with your union representatives to determine what steps the union is prepared to take on your behalf. If a grievance has not been filed, ask the union representative to do so immediately. The CBA most likely sets forth the amount of time within which a grievance must be filed. I would have expected that a union representative would have been in touch with you, especially inasmuch as you were terminated. You may also have an option to file a lawsuit for wrongful discharge.
Speak to your union representatives and also be prepared to discuss, in detail, the factual circumstances with an attorney -- either an attorney for your union or a private attorney.
Good luck to you.