An optimization model based on the discrete Morse theory is presented for the characteristics of Forman’s theory, which can obtain an optimal value or approximate optimal one by the algorithm of constructing a discrete Morse function in 3D space and above. The experimental results show that this model is effective for applications and especially for the optimization problem of a large amount of data. Based on an optimization model based on discrete Morse theory, the clustering framework is proposed. The experimental results on synthetic and UCI data sets show that the proposed algorithm can successfully divide data points overlapping into the feature space to many correct clusters, and also show the feasibility and effectiveness of the algorithm.