Can a company terminate me for a felony on my background check if they hired me prior to checking or discovering it?

Absolutely. A company has the right to protect itself and its’ employees. However, in doing so, they must consider and follow the Federal and State laws governing the rights of the employee. Consult an employment law attorney who can advise you on your particular situation.