The importance of type-II superconductors with strong pinning comes from their ability to carry large electrical currents in the presence of a magnetic field. We report on the results of the bulk magnetization measurements in the superconducting state in high-quality single crystals of BaFe 2−x Ni x As 2 at various doping levels ranging from the underdoped to the overdoped regimes. The zero-temperature superconducting critical current density J c at optimal composition x = 0.10, where the superconducting transition temperature T c reaches a maximum of 19.9(0.4) K, displays a pronounced sharp peak in the doping dependence. Thus the observed doping dependence of the critical current implies that pinning becomes stronger upon initial doping. In addition, the best pinning conditions are realized in the presence of structural and magnetic domains. Our results strongly suggest that the high J c values are mainly due to collective (weak) pinning of vortices by dense microscopic point defects with some contribution from a strong pinning mechanism. The experimental results of the normalized J c present a remarkably good agreement with the δl pinning theoretical curve, confirming that pinning in our samples originates from spatial variations of the charge carrier mean free path leading to small bundle vortex pinning by randomly distributed (weak) pinning centers for H c.