To investigate the mechanism of {101¯2} twinning in magnesium (Mg) single crystal and its influence on mechanical size effects and strain rate dependent deformation behavior, in-situ microcompression of Mg [21¯1¯0] pillars of various sizes from 0.5 μm to 4 μm was carried out in a scanning electron microscope (SEM) and also in a transmission electron microscope (TEM), covering strain rates from 10−4 to 10−2 s−1. The in-situ observations directly showed that the pile-up of prismatic dislocations acts as local stress concentration for the twin nucleation. Preceding the twin nucleation, the lead dislocation from the dislocation pile-up cross-slips to the basal plane and dissociates into partial dislocations, one of which trails a stacking fault (SF) behind. The twin nucleus of a finite size formed at the junction between prismatic dislocations and basal SFs and subsequently propagated rapidly across the pillar. The present in-situ observations reveal that not only the dislocation pile-up but also the dissociation reaction of dislocations play critical roles in the nucleation of {101¯2} twins. Furthermore, the {101¯2} twinning exhibits a relatively strong size effect in terms of the twin nucleation stress (size exponent n = 0.7). This pronounced size effect may arise from the fact that the precursor to twin nucleation, namely dislocation pile-up and junction formation, depends more strongly on the crystal size than the ordinary dislocation source operation. Moreover, a noticeable effect of the strain rate is that a higher rate (10−2 s−1) promotes the activation of basal slip within the{101¯2} twin. While the twin nucleation occurs more easily at a high strain rate, here the twin growth rate cannot cope with the applied strain rate, so that strain energy accumulation increases with applied strain. When the twin grows to reach the required twin thickness for basal slip, the basal slip promptly activates within the twinned region to release the accumulated strain energy and plastic deformation swiftly catches up with the applied strain rate.