The stochastic computing (SC) has been proven to be an energy-efficient way to perform neural network. In this study, we propose a field-free voltage-controlled spintronics SC system based on the magnetic tunnel junction (MTJ). We observe a stochastic switching behavior of the MTJ and that it could be controlled by the voltage applied on the device. The voltage-controlled stochastic switching behavior is used to encode numbers ranging from 0 to 1 into a series of random bit-streams in the SC system. Furthermore, the handwritten recognition task is performed on the MTJ-based SC system, achieving a 95% maximum accuracy, which is comparable with the floating-point based neural network. Our work provides inspiration for the energy-efficient neural network systems.