We report the critical current density (Jc) and vortex pinning properties in single crystals of a novel iron-based superconductor (IBS) KCa2Fe4As4F2 with large Jc in the pristine state, before and after introduction of artificial defects by swift-particle irradiation. The effects of 2.6 GeV U and 3 MeV proton irradiations in KCa2Fe4As4F2 single crystals on transition temperature Tc and Jc, including its dose dependence, are systematically studied. Jc~8 MA/cm2 under a self-field at 2 K in the pristine crystal is strongly enhanced up to 19.4 and 17.5 MA/cm2 by irradiation of 2.6 GeV U-ions and 3 MeV protons, respectively. Suppression of Tc and dose dependence of Jc in KCa2Fe4As4F2 is different from that in a representative IBS of (Ba,K)Fe2As2, which can be explained by considering the presence of embedded defects in pristine KCa2Fe4As4F2. The vortex dynamics in the pristine and proton irradiated KCa2Fe4As4F2 single crystals are also investigated from the analyses of the field dependence of Jc and the normalized magnetic relaxation rate. In addition to the contribution of embedded defects, weak collective pinning is considered for comprehensive analyses. Vortex dynamics in KCa2Fe4As4F2 is similar to those in (Ba,K)Fe2As2 to some extent, and different from that in anisotropic Li0.8Fe0.2OHFeSe. Large anisotropy, due to the presence of insulating blocking layers in KCa2Fe4As4F2, which leads to much lower irreversibility field (Hirr) compared with 122-type IBSs, strongly affect the vortex dynamics.