Introduction: Anemia remains a global public health problem, especially in developing countries. It affects primarily children under five (CU5), women of reproductive age (WRA), and pregnant women due to their higher need for iron. The most common form of anemia is iron-deficiency anemia (IDA). IDA is estimated to cause half of all anemia cases and one million deaths per year worldwide. However, there remains a lack of well-documented and biochemically assessed prevalence of IDA based on the representative population-based samples globally and regionally. In this study, we aimed to assess the National Nutrition Survey (NNS) 2018 to identify the prevalence and risk factors of IDA in Pakistani CU5 and WRA. Methods: Secondary analysis was conducted on the NNS 2018, a cross-sectional survey, which collected data on dietary practices, malnutrition, and food insecurity. Anemia was defined as hemoglobin levels < 11.0 g/dL in children and 12.0 g/dL in women. IDA was defined as low hemoglobin and low ferritin (<12 ng/mL) levels, adjusted for inflammation using AGP and CRP biomarkers in CU5 and WRA. Univariate and multivariable logistic regressions were conducted using Stata statistical software (version 16). We also compared the IDA rates of NNS 2018 and 2011. Results: A total of 17,814 CU5 and 22,114 WRA were included in the analysis. Of the CU5, 28.9% had IDA, while 18.4% of WRA reported to experience IDA. Among the CU5, IDA was most prevalent among male children aged 6–23 months living in rural areas and with the presence of diarrhea and fevers in the last 2 weeks. Children whose mothers had no education, were aged 20–34 years, and employed, had a higher prevalence of IDA. Married WRA, who are employed, living in rural areas, and with no education, had a higher prevalence of IDA. In the multivariable logistic regression, children aged 6–23 months (AOR = 1.19, 95% CI [1.08–1.33], p < 0.001) and with the presence of diarrhea in the last 2 weeks (AOR = 1.32, 95% CI [1.13–1.54], p < 0.001) or fever (AOR = 1.16, 95% CI [1.02–1.32], p = 0.02) had higher odds of IDA. At the household level, the odds of IDA among CU5 were higher in the poorest households (AOR = 1.27, 95% CI [1.08–1.50], p = 0.005), with ≥5 CU5 (AOR = 1.99, 95% CI [1.28–3.11], p = 0.002), and with no access to improved sanitation facilities (AOR = 1.17, 95% CI [1.02–1.34], p = 0.026). For WRA, the multivariable logistic regression found that the odds of IDA were higher among women with vitamin A deficiency (Severe: AOR = 1.26, 95% CI [1.05–1.52], p = 0.013; Mild: AOR = 1.36, 95% CI [1.23–1.51], p < 0.001), zinc deficiency (AOR = 1.42, 95% CI [1.28–1.57], p < 0.001), no education (AOR = 1.53, 95% CI [1.30–1.81], p < 0.001), and from severely food insecure households (AOR = 1.20, 95% CI [1.07–1.34], p = 0.001). The odds of IDA were lower among women whose body mass index was overweight (AOR = 0.77, 95% CI [0.69–0.86], p < 0.001) or obese (AOR = 0.71, 95% CI [0.62–0.81], p < 0.001). Conclusions: The child’s age, presence of diarrhea or fever, place of residence, household size, wealth status, and access to sanitation facilities were significantly associated with IDA among CU5 in Pakistan. For WRA, education, body mass index, vitamin A and zinc status, household food security status, wealth status, and access to sanitation facilities were significantly associated with IDA. Large, well-established, government-funded programmes focused on micronutrient supplementation, food fortification, the diversification of food supplies, and the treatment and prevention of infectious and parasitic diseases are needed to prevent IDA and all forms of anemia among children and women in Pakistan.