In this paper, we propose a joint sensing duration and transmission power allocation scheme to maximize the energy efficiency (EE) of the secondary user (SU) in a cooperative cognitive sensor network (CSN). At the initial time slot of the frame, the secondary transmitter (ST) performs energy harvesting (EH) and spectrum sensing simultaneously using power splitting (PS) protocol. The modified goodness of fit (GoF) spectrum sensing algorithm is employed to detect the licensed spectrum, which is not sensitive to an inaccurate noise power estimate. Based on the imperfect sensing results, the ST will act as an amplify-and-forward (AF) relay and assist in transmission of the primary user (PU) or transmit its own data. The SU’s EE maximization problem is constructed under the constraints of meeting energy causality, sensing reliability, and PU’s quality of service (QoS) requirement. Since the SU’s EE function is a nonconvex problem and difficult to solve, we transform the original problem into a tractable convex one with the aid of Dinkelbach’s method and convex optimization technique by applying a nonlinear fractional programming. The closed-form expression of the ST’s transmission power is also derived through Karush-Kuhn-Tucker (KKT) and gradient method. Simulation results show that our scheme is superior to the existing schemes.