Cooperative jamming is deemed as a promising physical layer-based approach to secure wireless transmissions in the presence of eavesdroppers. In this paper, we investigate cooperative jamming in a two-tier 5G heterogeneous network (HetNet), where the macrobase stations (MBSs) at the macrocell tier are equipped with large-scale antenna arrays to provide space diversity and the local base stations (LBSs) at the local cell tier adopt non-orthogonal multiple access (NOMA) to accommodate dense local users (LUs). In the presence of imperfect channel state information, we propose three robust secrecy transmission algorithms that can be applied to various scenarios with different security requirements. The first algorithm employs robust beamforming (RBA) that aims to optimize the secrecy rate of a marcouser (MU) in a macrocell. The second algorithm provides robust power allocation (RPA) that can optimize the secrecy rate of an LU in a local cell. The third algorithm tackles a robust joint optimization (RJO) problem across tiers that seek the maximum secrecy sum rate of a target MU and a target LU robustly. We employ convex optimization techniques to find feasible solutions to these highly non-convex problems. The numerical results demonstrate that the proposed algorithms are highly effective in improving the secrecy performance of a two-tier HetNet.