In this paper, we consider a class of sparse optimization problems, whose objective function is the summation of a convex loss function and a cardinality penalty. By constructing a smoothing function for the cardinality function, we propose a projected neural network and design a correction method for solving this problem. The solution of the proposed neural network is unique, global existent and bounded. Besides, we prove that all accumulations points of the proposed neural network have a common support set and have a unified lower bound for the nonzero entries. Combining the proposed neural network with the correction method, any corrected accumulation point is a local minimizer of the considered sparse optimization problem. Moreover, we analyze the equivalent relationship on the local minimizers between the considered sparse optimization problem and some other sparse problems. Finally, some numerical experiments are provided to show the efficiency of the proposed neural network in solving some sparse optimization problems.