A heat energy recovery system for being installed in a ship, which recovers heat energy of supercharged air from a supercharger of an internal combustion engine via a working medium while recovering heat energy of steam from an economizer via the working medium under a condition in which the steam is preferentially supplied to an apparatus that performs an operation using the steam, the heat energy recovery system comprising: a heat energy recovery circuit having a closed-type medium circulation path in which a first heater that heats the working medium by heat exchange between the supercharged air and the working medium, a second heater that is connected in series to the first heater and heats the working medium by heat exchange between the steam from the economizer and the working medium, an expander that generates power based on expansion of the working medium heated by the first heater and the second heater, a condenser that condenses the working medium flowing out from the expander, and a pump that conveys the working medium from the condenser are connected in sequence; a power recovery machine that is connected to the expander and recovers the power of the expander; a first steam flow path that causes the steam to flow from the economizer to the apparatus that performs an operation using the steam; a second steam flow path that branches off from the first steam flow path and causes the steam to flow from the economizer to the second heater; a controller that performs stop control to stop an operation of the pump based on at least one of a flow state of the steam in the first steam flow path and a flow state of the steam in the second steam flow path; and a detouring unit that causes the working medium to flow while detouring around the power recovery machine, wherein the controller controls the detouring unit such as to cause the working medium to detour around the power recovery machine in the stop control. a heat energy recovery circuit having a closed-type medium circulation path in which a first heater that heats the working medium by heat exchange between the supercharged air and the working medium, a second heater that is connected in series to the first heater and heats the working medium by heat exchange between the steam from the economizer and the working medium, an expander that generates power based on expansion of the working medium heated by the first heater and the second heater, a condenser that condenses the working medium flowing out from the expander, and a pump that conveys the working medium from the condenser are connected in sequence; a first heater that heats the working medium by heat exchange between the supercharged air and the working medium, a second heater that is connected in series to the first heater and heats the working medium by heat exchange between the steam from the economizer and the working medium, an expander that generates power based on expansion of the working medium heated by the first heater and the second heater, a condenser that condenses the working medium flowing out from the expander, and a pump that conveys the working medium from the condenser are connected in sequence; a power recovery machine that is connected to the expander and recovers the power of the expander; a first steam flow path that causes the steam to flow from the economizer to the apparatus that performs an operation using the steam; a second steam flow path that branches off from the first steam flow path and causes the steam to flow from the economizer to the second heater; a controller that performs stop control to stop an operation of the pump based on at least one of a flow state of the steam in the first steam flow path and a flow state of the steam in the second steam flow path; and