The homeowner reportedly opened the keyboard-sized case in front of his wife and 6-year-old granddaughter Wednesday night in Oceanside.
Instead of a toy plane they were buying for their friend's son, they found a semi-automatic rifle, scope, stand, ammo clip and copies of an Arizona man's driver's license and concealed-weapons permit.
They hustled their granddaughter out of the room and called police, who picked up the weapon.
Atlanta-based UPS said it's investigating the "highly unusual incident." The company said it accepts legal shipments of some firearms and shippers must meet certain requirements.
Read UPS' full statement below:
"This is a highly unusual incident, and we are investigating what may have happened in our network.
UPS does accept shipment of certain firearms in our domestic U.S. system as long as the shipments comply with applicable law and are shipped in accordance with company policies. These shipments must be between licensed manufacturers, dealers, distributors, collectors and exclude consumer shipments.
UPS puts responsibility with the shippers of regulated goods to follow the requirements for labeling and specific packaging.
We are working with the receiving consumer to make sure they receive their original order prior to the holiday."
The Associated Press contributed to this report.