Cargo box assembly and method of use thereof

A cargo box assembly and method of use thereof, wherein a cargo box is mounted within the bed of a pickup truck, and wherein the cargo box may be moved between a stored position at the forward end of the truck bed and a tailgate position at the rear end of the truck bed. The cargo box is mounted to a pair of rail assemblies, wherein each rail assembly comprises a chain and a pair of gears to facilitate motorized movement of the box within the truck bed.