Quality of service (QoS) provisioning in mobile ad hoc networks (MANETs) is one of the fundamental concerns in this area. Autonomous mobility of nodes is one of the main factors affecting the network QoS. A lack of fixed infrastructure and central control on the nodes complicate guaranteeing the QoS in MANETs. Security is a major factor affecting the QoS in such networks. This paper proposes a new routing method based on trust among the nodes and applies a clustering approach to MANETs. This routing scheme can calculate the trustworthiness of the route and the shortest routes to the destination by avoiding identified malicious nodes. The effects of node mobility and number of malicious nodes on routing performances are investigated in the reported research. Simulation is used to show the effectiveness of the proposed approach in comparison with a categorized trust method, Ad hoc On‐demand Distance Vector, trust vector‐based Ad hoc On‐demand Distance Vector, and trust vector‐based dynamic source routing in terms of end‐to‐end delay, network throughput, and packet delivery ratio at the expense of a moderate increase in the routing overhead. The proposed trust‐based routing method finds the trustworthy route by applying end‐to‐end trust calculation and finds the optimal route by performing clustering scheme from the source node to the destination node. In the extended proposed routing method, adding a nonce‐based encryption scheme results in improved packet delivery ratio, network throughput, and malicious node detection rate. Copyright © 2013 John Wiley & Sons, Ltd.