With the rapid development of the Internet of Vehicles (IoV), the demand for wireless spectrum resources has significantly increased. Dynamic spectrum sharing technology is regarded as a key solution to alleviate the shortage of spectrum resources. However, during the spectrum sharing process, security issues and a low utilization of the shared spectrum may arise. This study designs a consortium blockchain for trustworthy dynamic spectrum sharing in IoV environments. An improved asynchronous byzantine fault-tolerant algorithm is also designed to address the instability of signals in this scenario, and the allocation and management of spectrum resources between vehicles and base stations are further optimized using the Stackelberg game, ultimately deployed automatically through smart contracts. Simulation results show that our method not only significantly improves the system’s response time but also ensures communication quality and can maintain efficient operation under high network delay and complex scenarios.