Modified gravity theories have the potential of explaining the recent acceleration of the Universe without resorting to the mysterious concept of dark energy. In particular, it has been pointed out that matter-geometry coupling may be responsible for the recent cosmological dynamics of the Universe, and matter itself may play a more fundamental role in the description of the gravitational processes that usually assumed. In the present paper we study the quantum cosmology of the f (R, T ) theory of gravity, in which the effective Lagrangian of the gravitational field is given by an arbitrary function of the Ricci scalar, and the trace of the matter energy-momentum tensor, respectively. For the background geometry we adopt the Friedmann-RobertsonWalker metric, and we assume that matter content of the Universe consists of a perfect fluid. In this framework we obtain the general form of the gravitational Hamiltonian, of the quantum potential, and of the canonical momenta, respectively. This allows us to formulate the full Wheeler-de Witt equation describing the quantum properties of this modified gravity model. As a specific application we consider in detail the quantum cosmology of the f (R, T ) = F 0 (R) + θ RT model, in which F 0 (R) is an arbitrary function of the Ricci scalar, and θ is a function of the scale factor only. The Hamiltonian form of the equations of motion, and the Wheeler-de Witt equations are obtained, and a time parameter for the corresponding dynamical system is identified, which allows one to formulate the Schrödinger-Wheeler-de Witt equation for the quantum-mechanical description of the model under consideration. A perturbative approach for the study of this equation is developed, and the energy levels of the Universe are obtained by using a twofold degenerate pera e-mail: 253659701@qq.com b e-mail: t.harko@ucl.ac.uk c e-mail: stslsd@mail.sysu.edu.cn turbation approach. A second quantization approach for the description of quantum time is also proposed and briefly discussed.