Hard Worker,
I don't know whether failing a polygraph examination (let's suppose it's required for a top secret clearance with SCI access) might result in revocation of any lower level clearance (for example, secret collateral) that you may hold. Federal agencies have wide discretion in making security clearance determinations, and they do take polygraph results into account.
If you lose your security clearance, yes, your private employer may terminate your employment, assuming the clearance is a requirement for your current job. Failing the polygraph could make it harder to find employment elsewhere in positions that require a security clearance. To the best of my knowledge, the fact that you failed a polygraph would not appear in your credit reports (because it has nothing to do with your credit rating, and would, in fact, be information protected from public release under the Privacy Act).
Your safest bet would be to refuse the polygraph and remain in your current position.
If the agency that requires the polygraph is the Department of Defense, however, you should know that almost everyone
ultimately passes (if not the first time, then on a "re-test") their DoD counterintelligence-scope polygraph examinations. In fiscal years 2000 and 2001, the
only persons who failed to pass were those who made what DoD terms "substantive admissions." Thus, the key to passing the DoD polygraph is simply to avoid making any such admissions. (Other agencies, like the CIA and FBI, are not so easygoing, however.)
Another point to consider, if the agency involved is the Department of Defense, is that you have the right to appeal any decision to revoke or deny a clearance at a hearing before an administrative judge of the
Defense Office of Hearings and Appeals.
Before you agree to sit for any polygraph examination, I suggest, as Beech Trees recommended, that you download and read
The Lie Behind the Lie Detector.