The proposed protophobic fifth force in Phys. Rev. Lett. 117 , 071803 (2016) recently attracts much attention. To confirm or refute the existence of this new interaction, here I propose a method to probe the protophobic fifth force in dense matter that formed in nucleus-nucleus collisions. As expected, the protophobic fifth force has negligible effects on the usual observables in nucleusnucleus collisions. While the protophobic fifth force evidently affects the value of final positively and negatively charged pions ratio at very high kinetic energies. The signal thus could be used to probe the protophobic fifth force in dense matter by nucleus-nucleus collisions' experiments at current experimental equipments worldwide.