Intelligent reflecting surface (IRS) is a promising and disruptive technique to extend the network coverage and improve spectral efficiency. This paper investigates an IRS-assisted Terahertz (THz) multiple-input multiple-output (MIMO)-nonorthogonal multiple access (NOMA) system based on hybrid precoding in the presence of eavesdropper. Two types of sparse RF chain antenna structures are adopted, i.e., sub-connected structure and fully connected structure. Cluster heads are firstly selected for transmissions, and discrete phase-based analog precoding is designed for the transmit beamforming. Subsequently, based on the channel conditions, the users are grouped into multiple clusters, and each cluster is transmitted by using the NOMA technique. In addition, a low complexity zero-forcing method is employed to design digital precoding so as to eliminate interference between clusters. On this basis, we propose a secure transmission scheme to maximize the sum secrecy rate by jointly optimizing the power allocation and phase shifts of IRS under the constraints of system transmission power, achievable rate requirement of each user, and IRS phase shifts. Due to multiple coupled variables, the formulated problem leads to a non-convex issue. We apply the Taylor series expansion and semidefinite programming to convert the original non-convex problem into a convex one. Then, an alternating optimization algorithm is developed to obtain a feasible solution of the original problem. Simulation results are demonstrated to validate the convergence of the proposed algorithm, and confirm that the deployment of IRS can significantly improve the secrecy performance.