Context. Studies of Class 0 objects allow to characterize the dynamical processes taking place at the onset of the star formation process and to determine the physical mechanisms responsible for the outcome of the collapse. Observations of dense gas tracers allow for the characterization of key kinematics of the gas that are directly involved in the star formation process, such as infall, outflow, and rotation. Aims: This work is aimed at investigating the molecular line velocity profiles of the Class 0 protostellar object B335 and attempts to place constraints on the infall motions happening in the circumstellar gas of the object. Methods: We present observations of C17O (1-0), C18O (1-0), and 12CO (2-1) transitions along with an analysis of spectral profiles at envelope radii between 100 and 860 au. Results: C17O emission presents a double-peaked line profile distributed in a complex velocity field. Both peaks present an offset of 0.2-1 km s−1 from the systemic velocity of the source in the probed area. The optical depth of the C17O emission has been estimated and found to be less than 1, suggesting that the two velocity peaks trace two distinct velocity components of the gas in the inner envelope. Conclusions: After discarding possible motions that could produce the complex velocity pattern, such as rotation and outflow, we conclude that infall motions are responsible for producing the velocity field. Because inside-out symmetric collapse cannot explain those observed profiles, it is suggested that these are produced by non-isotropic accretion from the envelope into the central source along the outflow cavity walls.