Ad Hoc network is a special network with no center and dynamic topology changes. Due to the free mobility of nodes, routing security has always been a bottleneck problem that plagues network development. Therefore, this paper proposes a multi-path QoS (Quality of Service) routing security algorithm based on blockchain by improving the traditional AODV (Ad hoc On-Demand Distance Vector) protocol (AODV-MQS). The algorithm first establishes a blockchain network and saves the state of all nodes by making the intermediate nodes on the chain. Then the smart contract in the blockchain is set to filter out the nodes that meet the QoS constraints. Finally, two largest unrelated communication paths are found in the blockchain network through smart contract, one of which is the main path and the other is the standby path. Simulation experiments show that this algorithm has better performance than other algorithms in an unsafe environment.