The study of proper holomorphic mappings is an important and very active topic in several complex variables. In this paper, we investigate the proper mapping in the quaternionic setting. In particular, the proper self-mappings of the open unit ball of quaternions are precisely finite Blaschke products by a factorization of Hardy spaces for quaternionic slice regular functions. In addition, the proper self-mappings of the four-dimensional spherical shell are determined for quaternionic slice regular functions.