In some specific conditions, a flying spinning ball deflects in a direction opposite to that predicted by the Magnus effect, which is known as the inverse Magnus effect. To elucidate when and why this effect occurs, we measure the variations of the drag and lift forces on a rotating sphere and the corresponding flow field with the spin ratio (the ratio of the rotational velocity to the translational one). This counterintuitive phenomenon occurs because the boundary layer flow moving against the surface of a rotating sphere undergoes a transition to turbulence, whereas that moving with the rotating surface remains laminar. The turbulence energizes the flow and thus the main separation occurs farther downstream, inducing faster flow velocity there and generating negative lift force. Empirical formulae are derived to predict the location where the flow separates as a function of the Reynolds number and the spin ratio. Using the formulae derived, the condition for the onset of the inverse Magnus effect is suggested based on the negative lift generation mechanism.