Youl'll want to look around at the various threads about this (some under topic with "plane", some "flight", "fly", etc) and the LIthium Shipping Rules Discussion thread for the ES take on it. Some of the discussions are about bikes, some about scooters, some just about batteries.
But to actually take it on a flight, you'll have to check with your actual airline and see what they say, and exactly what their rules require and allow, so you'll know what you're allowed to do and how to pack it and how much it'll cost, and also what will happen if you decide to buck the system and do it a different way. (i.e., whether you'll just lose the bike/battery, or whether there are fines or confinement time or other deterrents involved).
And don't forget to make absolutely sure it can be taken back with you, too, from the other end--if not, you'll lose the bike (or at least it's battery) when you come back home.