In 2015, the Chinese government implemented referral reform in its hierarchical medical system by adjusting the reimbursement rules of medical insurance, in order to guide patients' hospital preference. This reform has impacted the equity and spatial accessibility of healthcare resources in different regions. Taking Beijing as a case study, we calculated and compared the equity and accessibility of healthcare resources before and after referral reform with a three-stage two-step floating catchment area method. We set different referral rates and explored their effects on medical service accessibility and equity. The results showed that the referral reform improved total accessibility of public hospitals in Beijing, but at the same time aggravated the inequality of healthcare resource accessibility among towns and streets. Healthcare accessibility demonstrated a U shape with an increase in referral rates. After testing five scenarios, we conclude that a 90% referral rate from the secondary hospitals to tertiary hospitals could be a trade-off when the government strikes a balance between equal chance of access to health services and high accessibility.