Mobile edge computing (MEC) is to process, analyse, store and calculate the network data at the edge of the network. When the ground infrastructure is damaged in an emergency, the unmanned aerial vehicle (UAV) formation can be rapidly deployed to undertake the task of MEC. However, there are some potential problems to be considered in UAV‐enabled MEC, such as the trust among UAVs from different ... [Show full abstract] sources and the stability of UAV formation network. In view of the problems existing, this study proposes a blockchain‐based architecture to build a system of mutual trust, fairness, openness, and stability in this scenario. Through the implementation of blockchain technology, key data such as device computing capacity, task allocation, and task execution process are recorded openly, transparently, and irrevocably. As multi‐party trust is built to reduce the occurrence of fraud, system participants can get a reasonable reward. On this basis, the smart contract is used to ensure that algorithms are accessible to the public, and the sub‐blockchain technology improves the stability of the system. In the case study, the simulation results show that the resource consumption and time cost of the proposed scheme is reasonable and feasible.