Task functional MRI (fMRI) has been widely employed to assess brain activation and networks. Modeling the rich information from the fMRI time series is challenging because of the lack of ground truth and the intrinsic complexity. Model-driven methods such as the general linear model (GLM) regresses exterior task designs from voxel-wise brain functional activity, which is confined because of ignoring the complexity and diversity of concurrent brain networks. Recently, dictionary learning and sparse coding method has attracted increasing attention in the fMRI analysis field. The major advantage of this methodology is its effectiveness in reconstructing concurrent brain networks automatically and systematically. However, the data-driven strategy is, to some extent, arbitrary due to ignoring the prior knowledge of task design and neuroscience knowledge. In this paper, we proposed a novel supervised stochastic coordinate coding (SCC) algorithm for fMRI data analysis, in which certain brain networks are learned with supervised information such as temporal patterns of task designs and spatial patterns of network templates, while other networks are learned automatically from the data. Its application on two independent fMRI datasets has shown the effectiveness of our methods.