Detection task allocation plays a significant role in many military applications. A better detection task allocation strategy can improve the operational efficiency of the military actions, such as improving tracking accuracy and attacking efficiency. However, the trajectory of the target is usually random which makes the allocation difficult to solve. In this paper, we consider the optimal detection task allocation (ODTA) problem to assign the detection task for each detection equipment in order to increase the overall detection efficiency of the detection system. We make the following contributions. First, this ODTA problem is formulated as a distributed Markov decision process (MDP) model. Each detection equipment only requires to know partial information of the other detection equipments which can save the computation burden. Second, a reinforcement learning approach combined with back-propagation network is proposed to solve this model in order to derive the optimal allocation strategy. Third, the numerical testing results demonstrate the proposed method can improve the overall detection efficiency of the system.