In recent years, mobile ad hoc networks (MANETs) have become popular in different areas. In MANETs, mobile nodes can join or leave the network freely. Because of the mobility of nodes and open wireless medium, MANETs are vulnerable to security attacks. In this thesis, we propose a novel framework of software-defined MANETs with trust management. Specifically, we separate the forwarding plane in MANETs from the control plane, which is responsible for the control functionality, such as routing protocols and trust management in MANETs. Using the on-demand distance vector routing (TAODV) protocol as an example, we present a routing protocol named software-defined trust based ad hoc on-demand distance vector routing (SD-TAODV). Simulation results are presented to show the effectiveness of the proposed software-defined MANETs with trust management.