Wireless Sensor Networks (WSNs) become an integral part of Internet of Things (IoT) and finds their applicability in several domains. As classical WSN faces several issues in service-based IoT applications, fog computing has been introduced in real-time, enabling local data processing and avoid raw data transmission to cloud servers. The Fog-based WSN generally involves advanced nodes, normal nodes, and some Fog Nodes (FN). Though the Fog-based WSN offers several benefits, there is a need to develop an effective trust-based secure routing protocol for data transmission among Cluster Heads (CHs) and FNs. In this view, this paper presents a Quantum Firefly Optimization based Multi-Objective Secure Routing (QFO-MOSR) protocol for Fog-based WSN. The main intention of the QFO-MOSR technique is to derive an optimal selection of routes between CHs and FNs in the network. The QFO-MOSR technique has incorporated the concepts of quantum computing and Firefly (FF) optimization algorithm inspired by the flashing behaviour of FFs. In addition, a multi-objective fitness function is derived by the QFO-MOSR technique using seven objectives: distance, inter-cluster distance, energy, delay, intra-cluster distance, link lifetime, and trust. The proposed routing technique derives a fitness function including trust factor from ensuring security. The design of the QFO-MOSR technique with a multi-objective fitness function shows the novelty of the work. To validate the performance of the QFO-MOSR technique, a series of experiments were carried out, and the results are investigated in terms of different measures. The experimental analysis ensured that the QFO-MOSR technique is superior to other methods in terms of different measures.