First you might need to consult with a licensed attorney in your state to ensure your rights are protected. In general companies that provide these types of benefits like tuition reimbursement have provisions like the one your described. If you accepted the funds under that premise, then the only way around it would be if they agreed to relax their rules. Otherwise it is most likely enforceable. It does not matter if you disagree with their decision to terminate your employment. Your best option would be to attempt to negotiate a payment plan, reduction in payment or disregard the debt all together. I would also advise you to review the terms of the tuition reimbursement to see if there are any other ways to address it.
Please note that the information provided should not be relied upon as legal advice as there are many other factors that might need to be considered before taking any legal action. My firm is experienced in handling legal claims in the employment law field and we would be honored to discuss your legal concern in greater detail if warranted. Thank you.