Unobserved heterogeneous treatment effects have been emphasized in the policy evaluation literature. This paper proposes a nonparametric test for unobserved heterogeneous treatment effects in a general framework, allowing for self-selection to the treatment. The proposed modified Kolmogorov-Smirnov-type test is consistent and simple to implement. Monte Carlo simulations show that our test performs well in finite samples. For illustration, we apply our test to study heterogeneous treatment effects of the Job Training Partnership Act on earnings and the impacts of fertility on family income.