In this paper, we investigate the physical layer security in an energy harvesting (EH) wireless network composed of a user (U) and a base station (BS) in the face of an eavesdropper. The total communication progress is divided into two phases. In the first phase, friendly jammers (Js) powered by a power beacon (PB). And in the remaining phase, the U sends messages to BS with the help of the Js. To improve the physical layer security, we propose an optimal friendly jammer selection (OFJS) scheme and a suboptimal friendly jammer selection (SFJS) scheme depending on the availability and unavailability of channel state information (CSI) for wiretap link. For the purpose of comparison, we present the random friendly jammer selection (RFJS) scheme. We derive the closedform expressions of connection outage probability (COP), secrecy outage probability (SOP) and effective secrecy throughput (EST) for OFJS, SFJS and RFJS schemes over Nakagami-m fading channels to evaluate the system secrecy performance. Numerical results show that the secrecy performance of proposed OFJS and SFJS schemes is better than that of RFJS scheme, demonstrating the advantage of proposed OFJS and SFJS schemes in improving the physical layer security, and moreover, the performance advantage becomes more significant with the increase of the number of Js. Additionally, due to the influence of COP, three schemes reach the same EST upper bound in the high signal-tonoise ratio (SNR) region.