We focus on the target detection problem of the multiple-input multiple-output (MIMO) radar in clutter. Most of the existing MIMO radar detection works rely on the clutter models, which may limit their scopes of application. To address this issue, a deep learning based MIMO radar target detection framework is proposed in this paper, which utilises the powerful representation and discrimination capabilities of deep neural networks (DNNs) to improve the detection performance in a data-driven manner and does not require any prior information about the clutter distribution. In most classification problems, DNNs are trained with the cross entropy loss, which promotes DNNs to achieve higher accuracy. However, the main concern in the radar target detection problem is the probability of detection (PD) under a given probability of false alarm. In this framework, a novel loss is proposed to directly maximise the average PD of the DNN, or equivalently maximise the area under curve of the DNN. Under the DL-based MIMO radar target detection framework, a deep convolutional neural network (CNN) architecture is introduced, and an input feature of the received signal for the CNN based on the conventional generalised likelihood ratio test statistics is designed to further improve the detection performance. Finally, extensive simulation results are presented to validate the detection performance and the robustness of the proposed methods.