Objective To assess the HIV/AIDS related knowledge, attitude, prevalence of premarital sexual intercourse among unmarried female migrant workers in Shanghai, and to explore factors associated with premarital intercourse. Methods A total of 800 unmarried female migrant workers from three factories were recruited using cluster random sampling. The response rate was 96.1% (769 replies) and 762 (99.1%) were usable questionnaires. The questionnaire contents were emographic characteristics, HIV/AIDS related knowledge, attitude, and prevalence of premarital sexual intercourse. Logistic regression was used to examine the correlation between premarital sexual intercourse and risk factors. Results The overall correct answer rate of HIV/AIDS related knowledge was 56.4%; the participants against premarital sexual intercourse were 38.1%; and the prevalence of premarital sexual intercourse was 36.1%. Multiple-logistic regression analysis shower that premarital sexual intercourse was associated with four factors: ①age (>25 years group vs <20 years group: OR=2.16, 95%CI=1.12-4.17), ②current residence (rental vs dormitory: OR=3.67, 95%CI=2.03-6.63), ③hometown (east vs mid-west: OR=3.13, 95%CI=1.64-5.97), ④attitude to premarital sexual intercourse (agree vs disagree: OR=9.23, 95%CI=4.90-17.39; neutrality vs disagree: OR=3.85, 95%CI=2.16-6.86). Conclusion Unmarried female migrant workers in Shanghai relatively lack of HIV/AIDS related knowledge, but they have open attitude toward premarital sexual intercourse so the prevalence of premarital sexual intercourse is high. It is necessary to conduct safe sex promotions to reduce the risk of HIV/AIDS, other sexual transmitted infections, and unintended pregnancy.