Handguns can be brought with you while traveling by air carrier. You must declare it at the counter and it must be checked in with it in a hard case. You cannot put ammo in that case. You must have the keys to that hard case in your possession so the agent can examine it. You cannot have any tags or stickers on the hard case that identify it is a gun.
UPS and the USPS will accept handguns for shipping if you own it and are shipping it to yourself. Read the following from UPS:
Special Procedures for Shipping Firearms
Use These UPS Services for Your Firearm Shipment
UPS accepts packages containing firearms, as defined by Title 18, Chapter 44, and Title 26, Chapter 53 of the United States Code, for transportation from and between licensed importers, licensed manufacturers, licensed dealers, and licensed collectors, as defined in Title 18, Chapter 44 of the United States Code, law enforcement agencies of the United States (or of any department or agency of the United States) and law enforcement agencies of any state or department agency (or political subdivision of any state), and from and between persons not otherwise prohibited from shipping firearms by federal, state or local law and when such shipment complies with all applicable federal, state and local laws applicable to the shipper, recipient and package.
Handguns, as defined by 18 U.S.C. § 921,will be accepted for transportation only via UPS Next Day Air® Early A.M.®, UPS Next Day Air®, or UPS Next Day Air Saver® services. (Note: UPS Express CriticalSM Service is not available for firearms).
UPS accepts firearm parts for shipment, provided the part is not a "firearm" as defined under federal law; the contents of the package cannot be assembled to form a firearm; and the package otherwise complies with federal, state, and local law. (Note: Receivers or frames of a firearm, firearm mufflers and silencers are considered "firearms" and are accepted for transportation only if shipped in accordance with UPS's requirements for shipping firearms.)
UPS does not accept automatic weapons, including machine guns, for shipment.
Firearms, including handguns, and firearm parts are not accepted for shipment internationally
Ammunition may be accepted for shipment internationally provided it is shipped in accordance with the UPS Guide for Shipping International Goods.
UPS ReturnsSM Services are not available for packages containing firearms.