This study presents an integrated design and optimization of an Organic Rankine Cycle (ORC) for the recovery of waste heat from aluminium production. Non-Linear Programming (NLP) models were developed, with the objectives of maximizing electricity production and the Net Present Value (NPV) of the system. The models account for optimizing the operating conditions and changes in thermodynamic features of the system. The developed models are applied to a case study of Slovenian aluminium company where the performance of three different working fluids (R245fa, R1234yf and R1234ze) are compared. The optimization is performed considering different temperatures and prices of produced hot water and electricity, minimum approach temperature (ΔTmin), concentration of CO2 in flue gas and temperature and flowrate of flue gas. Results show that the selected working fluids for the proposed waste heat-based ORC system have the potential to substitute up to about 830 kW of electricity in a sustainable and economic manner. Out of the three working fluids considered, R245fa showed up to 7.9% efficiency of the ORC cycle and was identified as the best performing working fluid considering both economic viability and the amount of electricity produced by the system, however the refrigerant inherently has higher GHG footprint.