Separation sequence optimization is an energy-saving strategy for improving the process economy. This work introduces a rigorous simulation-based method to identify the best separation sequence for the separation of N-component mixture, aiming to reduce the total operating cost. Through data interaction between Aspen HYSYS and MATLAB, a separation sequence matrix and an operating cost matrix for the N-component mixture are established. Based on this, the optimal separation sequence with the lowest total operating cost is automatically identified. The separation of 5-component hydrocarbon mixture is studied to illustrate the feasibility of the proposed method. This work also evaluates separation sequences for variant feed compositions, and shows the effects of feed compositions on the best separation sequences. This method is also applicable for separation of the other mixture, giving a new solution for identification of the optimal separation sequence.