Anemia in pregnancy, which is a public health concern for most developing countries, is predominantly caused by iron deficiency. At least, 180 days of iron and folic acid (IFA) supplementation is recommended for pregnant women to mitigate anemia and its adverse effects. This study aimed to examine compliance with the recommendation of IFA supplementation and its underlying factors using the 2017 Philippine National Demographic and Health Survey data. The variables assessed included age, highest level of education, occupation, wealth index, ethnicity, religion, residence, number of pregnancies, time of first antenatal care (ANC) visit and number of ANC visits. Compliance with the recommendation of at least 180 days of IFA supplementation was the outcome variable. The study assessed 7983 women aged 15–49 years with a history of pregnancy. Of these participants, 25.8% complied with the IFA supplementation recommendation. Multiple logistic regression analysis showed that pregnant women of Islamic faith and non-Indigenous Muslim ethnicity were less likely to comply with the IFA supplementation recommendation. Being aged between 25 and 34 years, having better education and higher wealth status, rural residency, initiating ANC visits during the first trimester of pregnancy and having at least four ANC visits positively influenced compliance with IFA supplementation. The effect of residence on IFA adherence differed across the wealth classes. Strategies targeted at specific groups, such as religious minorities, poor urban residents, the less educated and young women, should be strengthened to encourage early and regular antenatal care visits for improving compliance.