China has experienced a dramatic increase in the number of HIV infections. To control the AIDS epidemic, free HIV voluntary counseling and testing has been made available in China. This study compared the cost-effectiveness of this program for 2 populations-the general population and men who have sex with men (MSM), to examine the value for money of this program. A Bernoulli-process model has been used to translate the changes in sexual behaviors to the number of HIV infections averted. Costs are estimated from a societal perspective. The outcomes are measured in terms of the incremental cost per HIV infection averted and the incremental cost per disability-adjusted life-year averted. The study found that the voluntary counseling and testing for the general population is not cost-effective based on the threshold adopted, whereas the same HIV prevention program for MSM is cost-saving. These results suggest that the efficiency of resources used could be substantially improved by appropriately targeting high-risk population groups. Therefore measures should be taken to increase the uptake of this intervention among high-risk groups.