He lied to the FBI after a plea bargain which involved him telling them the truth. From memory, this all happened before his Congress testimony but it's definitely not related.
It is illegal to lie to Congress (unrelated to whether you're under oath or not), but I can think of very few examples where there were real ramifications for it.