The development of a real estate economy is beneficial to urban stability. A method of real estate price prediction based on transport accessibility is proposed. The method adds bus accessibility and metro accessibility into the model, which has higher prediction accuracy than the traditional model. Firstly, bus accessibility and metro accessibility are calculated according to the space syntax theory. Then, four models, the traditional hedonic price model (HPM) with transport accessibility, the traditional hedonic price model without transport accessibility, the random forest (RF) model with transport accessibility, and the random forest model without transport accessibility, are introduced. Finally, the four models are compared and analyzed in terms of precision and importance of index contributions. Taking Xi `an, China, as an example, the experimental results show that the transport accessibility calculated based on space syntax can accurately represent the transport convenience in an urban space structure. Furthermore, it has a great influence on the contribution of indexes in the model. With the introduction of bus accessibility and metro accessibility, the accuracy of the real estate price prediction model is greatly improved.