To meet the fluctuating demand for empty containers at inland freight stations, liner companies often adopt the method of a combination of self-owned and leased empty containers. Therefore, estimating the amount of self-owned and leased empty containers that need to be allocated to each inland freight station in a specific area becomes a critical issue for liner companies. However, owing to the high degree of unpredictability of the demand and the limited flexibility of empty container relocation, the abovementioned issue has not been fully addressed. This paper provides a model for empty container allocation without knowing the probability distribution function of empty container demand in advance. The abovementioned model can jointly optimize the quantities of self-owned empty containers and leased containers allocated to each inland freight station. To solve the abovementioned model, a largest-debt-first policy is adopted to simplify the complicated model, and a differential evolutionary algorithm is developed to solve the simplified model. Numerical experiments are conducted to validate the model. In comparison to conventional way such as overstock, our method significantly reduces the self-owned empty container storage level, improves the ability of liner companies to deal with fluctuations in empty container demand, and offers necessary decision support for liner companies’ daily container management.