If the first action is truly handoff, this is a legal play. But in some cases, the QB flips the ball to the back in motion, actually letting go of the ball before it reaches the back. In that case, the first action is a pass, and the play would be illegal.
I got caught on this as a statistician. Marlon Brown, Georgia wide receiver, goes in motion across the formation, Murray flips the ball to him as he passes. Except I didn't see that the ball left Murray's hand before reaching Brown. I called the play a rush, and was corrected by the Georgia coaches that this was a pass.
Of course, later in the same period, they ran the same play the other direction with Malcolm Mitchell. Again, i rule a rush, they want it to be a pass. But on this one, replays clearly showed that Murray did not let go of the ball before it got to Mitchell, so that one stayed as a rush.