In this letter, we propose and prove the asymptotic optimality of a particle-filter-based detection scheme. The detection method can be used in a general nonlinear/non-Gaussian signal detection problem. The proposed detection mechanism is based on the likelihood ratio (LR) and thus optimal in the Neyman-Pearson sense, but we approximate the LR based on a particle filter (PF). We show the asymptotic optimality by proving that the PF-based approximation of the LR converges to the true LR as the number of particles increases to infinity. We also discuss the practical and operational implications of the result, the main one being that it is optimal in the sense that no other processing and detection mechanism can have higher probability of detection, while having the same or lower false alarm rate.