This paper proposes a tri-generation system based on a diesel engine. An organic Rankine cycle and an ejector refrigerant cycle are employed to recover the diesel engine waste energy and produce cooling and more power. Also, a heat exchanger is installed to supply the heating demand. The mass, energy, exergy, exergoeconomic, and environmental analyses are applied to evaluate the proposed system's performance. Twelve biodiesels and pure Diesel energetic, exergetic, exergoeconomic, and environmental performances are compared to select a proper fuel for the designed system. Furthermore, the system's optimum state is evaluated through the exergy-economic assessment. In this regard, the Canola B20 is chosen as the best fuel for the designed system, which provides 7468 kW net power with 37.96% exergetic efficiency, 1.611 sustainability, and 1.635 environmental impact indexes at the base state. The engine exergetic efficiency is influenced by the engine load, while the total exergetic efficiency is affected by the engine speed. Besides, the ORC flow rate as the subsystem variable criteria has the highest effect on the system performance. Also, the system exergetic efficiency and unit product cost are obtained to be 37.96% and 11.196 $/GJ at the optimum state, respectively.