What you actually want to capture is possibly called the panning. You need to set your camera to high shutter speed and pan it while taking the shot. But remember one thing, you will have to be quite judgmental about the shutter speed. It should neither be too slow as slow shutter speed will not be able to freeze the moving object, it should neither be too fast as you will not get time to effectively pan / move your along with the moving subject. So the best thing is to try to shoot by varying the shutter speed somewhere between 1/30 sec to 1/100 sec.
Hope this solves you problem.