In this paper, the molecular dynamics method was used to analyze mechanical properties and microscopic deformation mechanisms of CoCrNi medium-entropy alloy with different average grain sizes at various temperatures. Its elastic modulus and Poisson's ratio were first calculated by the constant pressure molecular dynamics method. It is found that the elastic modulus increases with the average grain size increasing and is reduced at elevated temperatures. However, its Poisson's ratio decreases with the average grain size increasing and is not sensitive to temperatures.Simulations of simple tension were carried out and the results show that: (1) when the average grain size exceeds 15.2 nm, its yield stress and maximum flow stress decreased with the average grain size raising (Hall-Petch relationship), in this situation it is speculated that the dislocation slips and deformation twins within the grains dominate the plastic deformation; (2) when the grain size is smaller than 15.2 nm, the two stress parameters instead increase with the average grain size increasing (Inverse Hall-Petch relationship), such a plastic deformation mechanism is understood mainly due to grain boundaries migrations and grain rotations. In the end, as temperature effects on microscopic deformation mechanisms are concerned, it is found that more dislocations tend to be plugged near grain boundaries which have lower mobility at lower temperatures. Accordingly, the two stress parameters increase as the temperature decreases.