The liquid-phase pipeline is the optimal choice for large-amount and long-distance ethane transportation. Selecting the optimal diameter is necessary for the economical design of the pipeline. However, the special critical temperature 32.2 °C and critical pressure 4.87 MPa of ethane makes it easy to become liquid-vapor phase change, which is not considered in the traditional natural gas or crude oil pipeline design. In this paper, a new mathematical model is built to calculate the optimal diameter of the ethane pipe by using the ‘pump station + pipeline’ unit as the research object. The model selects the lowest total pipeline construction and operation costs as the objective function, and the constraints include the ethane liquid-vapor phase change, the pipe maximum allowable stress, and pipe specifications. In particular, the liquid-vapor phase change constraint is added to the traditional model to avoid the ethane liquid-vapor phase change, which is obtained by quantitatively analyzing the variation of physical parameters of ethane close to the pressure-temperature phase boundary. The optimization model is solved by use of the genetic algorithm. Finally, optimal pipe diameters are calculated for the conditions of transmission capacity from 1000 t/d to 10,000 t/d. Comparisons of calculated pipe diameter with eight actual cases show that the results are feasible with the average and maximum deviations being less than 5% and 8%, respectively. The effects of pipe materials and electricity prices on the pipe diameter are analyzed. It is demonstrated that the pipe material has a negligible effect on the optimal diameter, whereas increasing the electricity price will lead to the increase of the optimal diameter in the case of large transmission volumes.