Aiming at the problem of low user satisfaction of traditional ecological building space optimization methods, this paper introduces attribute analytic hierarchy process (AHP) model to effectively improve the effect of ecological building space optimization. This paper constructs an index system for the optimal design of ecological building space, and divides it into target level, criterion level and space level. Using the attribute analytic hierarchy process (AHP) model to construct attribute judgment matrix and weight, the general evaluation model of ecological building space optimization design is obtained. In this paper, multi-objective genetic algorithm is used to collect the spatial information of ecological building and determine the specific value of each parameter of ecological building. It used octopus to optimize the calculation results of multiple fitness functions and realized the optimized design of ecological building space. The experimental results show that the proposed method can significantly improve the user satisfaction of ecological building space, and people’s satisfaction of the three open spaces of the overhead fire fighting channel, the main building, and the arc wall enclosure space are 62.13 points, 43.93 points, and 52.55 points, respectively, which shows that the satisfaction of the sunken courtyard is the highest.