Driven by advanced 5G cellular systems, mobile edge computing (MEC) has emerged as a promising technology that can meet the energy efficiency and latency requirements of IoT applications. Edge service migration in the MEC environment plays an important role in ensuring user service quality and enhancing terminal computing capabilities. Application services on the edge side should be migrated from different edge servers to edge nodes closer to users, so that services follow users and ensure high-quality services. In addition, during the migration process, edge services face security challenges in an edge network environment without centralized management. To tackle this challenge, this paper innovatively proposes a blockchain-based security edge service migration framework, Falcon, which uses mobile agents different from VM and container as edge service carriers, making migration more flexible. Furthermore, we considered the dependencies between agents and designed a service migration algorithm to maximize the migration benefits and obtain better service quality. In order to ensure the migration of edge services in a safe and reliable environment, Falcon maintains an immutable alliance chain among multiple edge clouds. Finally, the experimental results show that “Falcon” has lower energy consumption and higher service quality.