We propose an experimental scheme to simulate the fractionalization of the particle number by using a one-dimensional spin-orbit-coupled ultracold fermionic gas. The desired spin-orbit coupling, a kinklike potential, and a conjugation-symmetry-breaking mass term are properly constructed by laser-atom interactions, leading to an effective low-energy relativistic Dirac Hamiltonian with a topologically nontrivial background field. The designed system supports a localized soliton excitation with a fractional particle number that is generally irrational and experimentally tunable, providing a direct realization of the celebrated generalized Su-Schrieffer-Heeger model. In addition, we elaborate on how to detect the induced soliton mode with the fractional particle number in the system.