Motion analysis in a driver-assistance system plays a very important role for improving driving safety. The objective of this paper is to propose a vision-based system for analyzing the motions of nearby vehicles on a freeway. When the video sequences captured from a forward-looking camcorder mounted in a vehicle are input, the vehicle feature extraction is performed in the area of the road surface. The feature extraction results are then fed into the spatiotemporal attention neural module. Once the focuses of attention, which indicate the possible locations of vehicle, are formed, the segmentation and tracking module is activated. The tracking results of consecutive frames are analyzed using an accumulated method. The experimental results show that our method can quickly and correctly recognize the motion of nearby vehicles in front of our vehicle.