Liquid hydrogen (LH2) is a promising and economical clean energy for achieving global carbon neutrality. Multi-layer insulation (MLI) with high performance is essential for the safe storage and operation of LH2. To perform a better optimization of MLI, the second law of thermodynamics becomes a complement to the first law of thermodynamics. However, very few studies have carried out the optimization of MLI performance through the second law of thermodynamics. For the sake of achieving more efficient optimization of MLI as well as revealing the fundamental indicators limiting the performance of MLI, this paper analyzes the characteristics of entropy generation produced by the solid heat conduction, thermal radiation, and residual gas conduction distributed in the MLI schemes by a validated layer-by-layer model.For a 40-layer MLI arranged with a constant layer density of 20 layers/cm, the first 15 layers near the cold boundary occupy more than 98% of the total entropy generation, providing an effective range of layers for thermodynamic optimization. Besides, an optimization of variable-density MLI (VDMLI) separated into two segments based on the entropy generation minimization is conducted. The optimal VDMLI has substantially lowered the entropy generation from the solid heat conduction but at the cost of increasing the entropy generation from radiation and residual gas conduction. This study provides a reliable optimization method of MLI, which allows the safe storage of clean energy with a low boiling temperature.