This paper addresses a multiple-input, single-output (MISO) downlink secure wireless communication system assisted by an intelligent reflecting surface (IRS). Instead of employing a conventional IRS model that requires an external power supply, we consider a self-powered IRS to achieve extra resource efficiency. Our goal is to design a beamforming vector at the transmitter side and phase shifters for the IRS that maximize the secrecy rate while assuring seamless IRS operation via energy harvesting (EH). Since the considered optimization cannot be solved analytically, we propose to utilize deep reinforcement learning (DRL). Numerical results verify that the proposed DRL-based solution outperforms the conventional relaxed convex optimization approach in both secrecy and energy harvesting perspectives.