A new selection criterion of heat-generating technologies for the district heating systems (DHS) retrofit, Marginal Levelized Price of Energy (MLPOE), is proposed. MLPOE is the minimum weighted marginal price of thermal energy produced by the technological unit. MLPOE accounts for the costs and incomes of considered heat generation technologies and allows more accurate comparison among technologies that produce only one type of energy with multi-product technologies, e.g. cogeneration technologies and technologies that provide ancillary services to power systems in addition to only heat production. The calculations with the use of the proposed criterion of heat-generation technologies implementation into DHS during its retrofit are showed that: - the electric boilers are economically feasible since as they are capable to provide ancillary services in case of electrical supply failures. The implementation of an electric boiler with an installed capacity of about 10 MW requires 2 -3.5 times higher expenditures for its connection to the grid, which leads to a 2.5 - 5 times longer payback period, but electric boilers' MLPOE is more than 2 times less than the average in Ukraine (1265.8 UAH / Gcal); - the heat pumps usage in DHS is feasible if they are used for heat supply purposes only with the capability to provide ancillary services. The marginal price for ancillary services should be not less than 17.1 € / MWh (as of 2020); - the boilers burning natural gas due to the lowest specific investment costs and hence small payback period will be widely used during DHS retrofit under conditions of low-carbon development of Ukraine; - the biomass burning boilers and cogeneration units will not be widely used due to the limited fuel resource (biomass) and on stock areas. The capacities of 1 - 6 MW are estimated to be in operation for DHS; Gas-piston cogeneration units are economically feasible for daily power system regulation. At the same time, they provide the lowest minimum weighted average break-even price of thermal energy for the heat supply company. Keywords: Marginal Levelized Price of Energy, Levelised Cost of Energy, power system, electric loads, heat pumps, boilers, cogeneration, district heating system