Hepatitis B virus (HBV) infection is a serious public health problem in sub-Saharan Africa. The risk of vertical transmission increases if the mother is hepatitis B surface antigen (HBsAg) positive and more so when she is also hepatitis B envelope antigen (HBeAg) positive. Since 2000, the World Health Organization recommends screening of pregnant women for HBV infection. However, this is not currently practiced in Tanzania. The objective of this study was to determine seroprevalence and associated factors of HBV infection among pregnant women attending antenatal clinic at the Muhimbili National Hospital, in Dar es Salaam, Tanzania. This cross-sectional study was conducted from August-September 2010. Data on sociodemographic characteristics, obstetric and risk factors such as history of blood transfusion, and risky sexual practices was collected. Blood samples were tested for HBsAg, HBeAg, antibodies to HBsAg (AntiHBs), IgM antibodies to hepatitis B core antigen (Anti-HBc) and anti-HIV antibodies. A total of 310 pregnant women (28.5±5.4 years) were enrolled in the study. Thirty-one percent (96) of the women were primigravidae. Most of studied women were of low educational status and married. The seroprevalence of HBsAg was 3.9% (12/310) and none had detectable anti-HBs. None had IgM HBcAb, thus excluding acute HBV infection. All women tested negative for HBeAg. The overall seroprevalence of HIV infection was 9.7%. Three of 12 (25%) women had HBV-HIV co-infection. None of the assessed associated factors were significantly related to HBV infection. In conclusion, the seroprevalence of HBsAg among women attending antenatal care at Muhimbili National Hospital is moderate. It is recommended to introduce routine antenatal screening for HBV and "at birth dose" vaccination to new born babies of mothers found to be HBsAg positive.