Blockchain (BC) with a clustering scheme can be used to build secure and smart Vehicular Ad-Hoc Networks (VANETs), which provide improved data integrity, enhanced security, efficient resource allocation, and streamlined processes. This technology has revolutionized the transport industry by enabling safer, more efficient, and transparent transportation networks. Therefore, this paper concentrates on the design of a new Blockchain with a Quantum Mayfly Optimization-based Clustering Scheme for Secure and Smart Transport Systems (BQMFO-CSSTS) technique. The objective of the presented BQMFO-CSSTS technique is to build a secure VANET via a BC-based technology and clustering process. Moreover, the BQMFO-CSSTS technique initially uses a Quantum Mayfly Optimization (QMFO) system with a fitness function for the selection of cluster heads (CHs) and the cluster construction process. In addition, BC technology is used as trust infrastructure to provide trustworthy services to the user and protect the privacy of the CHs and cluster members (CMs). The proposed scheme leverages the decentralized and immutable nature of BC to establish trust and ensure the integrity of cluster formation in VANETs. Finally, the BQMFO-CSSTS technique uses trajectory similarity metrics to protect the integrity of the CMs against attacks. The simulation results of the BQMFO-CSSTS technique are validated using a series of measures. The comprehensive results reported the superior outcomes of the BQMFO-CSSTS method over other recent approaches, with the maximum throughput being 1644.52 kbps. Therefore, integration of BC technology provides a transparent and secure framework through which to manage cluster membership, data sharing, and trust establishment among vehicles.