Yes. It is legal to ship a gun. However, the devil is in the details. First, a gun can only be shipped to the holder of a valid Federal Firearms License. The sender, however, is not required to have a valid Federal Firearms License. Second, the sender must not be otherwise prohibited from owning a gun. If you are prohibited from owning a gun, you cannot ship a gun. Third, the sender must also notify the shipping company that the package contains a gun. Ammunition cannot be shipped with the gun. You should also check with the different shipping companies to determine their internal policies and procedures.