In this paper, we present an online visual object tracking algorithm based on the discriminative sparse representation framework. Unlike the generative sparse representation based tracking algorithms, the proposed method casts the tracking problem into a binary classification task. To achieve discriminative classification, a linear classifier is embedded into the sparse representation model by incorporating the classification error into the objective function. The dictionary and the classifier are jointly trained using the online dictionary learning algorithm, thus allow the model can adapt the dynamic variations of target appearance and background environment. The target locations are updated based on the classification score and the greedy search motion model. We evaluate the proposed method using five benchmark datasets with detailed comparison to three state-of-the-art tracking algorithms. Both the qualitative and quantitative experimental results show that the discriminative sparse representation facilitates the tracking performance.