This paper presents a joint beamforming scheme for secure communication in cognitive hybrid satellite- terrestrial network (HSTN). In this network, a multibeam satellite communication network termed as the primary network under the intercept of an eavesdropper shares spectrum with a terrestrial network termed as the secondary network. Specifically by considering that the powers of both the primary and secondary transmitters are limited to the certain values, we aim to maximize the secrecy rate for the primary user (PU), while the quality- of-service (QoS) of the secondary user (SU) is satisfied, and set up a constrained optimization problem. Since the optimization problem is nonconvex and its solution is very difficult to be obtained, we propose a reformulation technique to convert the objective function into a second order cone constrain. Thus, standard numerical packages and randomization techniques can be used to calculate the beamforming (BF) vectors of the satellite and base station (BS). Simulation results are provided to verify that with joint BF algorithm, the network can maintain a sufficient QoS of the SU, while providing high secrecy rate of the PU.