Utilizing urban rail transit systems for goods movement in congested areas, i.e., the metro-based underground logistics system, offers a promising solution to enhance urban mobility and supply chain efficiency. This novel concept focuses on reconfiguring underground station space and equipment to accommodate arriving goods with automated in-station logistics operations (e.g., handling, storage, sorting, and distribution). Based on a spatialfunctional analysis, this paper elaborates on the metro station logistics space design (MSLSD) problem where decisions such as freight department area and location, working device allocation, and material handling routing are optimized hierarchically to generate the best station freight hall layouts. We considered strategies such as grid-based location encoding, optional device portfolio, shortest obstacle avoidance paths, and constraints from department shapes, aisles, capabilities, and budgets. Two bi-level mixed-integer programming models are developed to achieve minimum costs for facility building, device installation, and operations, which also consider the maximization of the functional closeness and freight handling efficiency of the station layout scheme. A two-stage solution program combining the adaptive immune genetic algorithm (AIGA), plant grow simulation heuristic and A* search procedures is proposed to deal with computational complexity associated with large-scale combinatorial optimization. Through two groups of numerical experiments, we demonstrate that the proposed algorithms can significantly improve solution diversity and global searching performance. Finally, the results of applying our model and algorithms to address the real-world metro station logistics space design cases are reported. Impacts of model objectives, device specifications, and buildable sites on the best station logistics space layouts are discussed. This study provides an effective decision support tool for redesigning metro station layout incorporating logistics functions, which helps to improve the serviceability and sustainability of urban underground traffic.