BackgroundAlthough risk factors for differences in SARS-CoV-2 infections between migrant and non-migrant populations in high income countries have been identified, their relative contributions to these SARS-CoV-2 infections, which could aid in the preparation for future viral pandemics, remain unknown. We investigated the relative contributions of pre-pandemic factors and intra-pandemic activities to differential SARS-CoV-2 infections in the Netherlands by migration background (Dutch, African Surinamese, South-Asian Surinamese, Ghanaians, Turkish, and Moroccan origin).MethodsWe utilized pre-pandemic (2011–2015) and intra-pandemic (2020–2021) data from the HELIUS cohort, linked to SARS-CoV-2 PCR test results from Public Health Service of Amsterdam (GGD Amsterdam). Pre-pandemic factors included socio-demographic, medical, and lifestyle factors. Intra-pandemic activities included COVID-19 risk aggravating and mitigating activities such as physical distancing, use of face masks, and other similar activities. We calculated prevalence ratios (PRs) in the HELIUS population that was merged with GGD Amsterdam PCR test data using robust Poisson regression (SARS-CoV-2 PCR test result as outcome, migration background as predictor). We then obtained the distribution of migrant and non-migrant populations in Amsterdam as of January 2021 from Statistics Netherlands. The migrant populations included people who have migrated themselves as well as their offspring. We used PRs and the population distributions to calculate population attributable fractions (PAFs) using the standard formula. We used age and sex adjusted models to introduce pre-pandemic factors and intra-pandemic activities, noting the relative changes in PAFs.ResultsFrom 20,359 eligible HELIUS participants, 8,595 were linked to GGD Amsterdam PCR test data and included in the study. Pre-pandemic socio-demographic factors (especially education, occupation, and household size) resulted in the largest changes in PAFs when introduced in age and sex adjusted models (up to 45%), followed by pre-pandemic lifestyle factors (up to 23%, especially alcohol consumption). Intra-pandemic activities resulted in the least changes in PAFs when introduced in age and sex adjusted models (up to 16%).ConclusionInterventions that target pre-pandemic socio-economic status and other drivers of health inequalities between migrant and non-migrant populations are urgently needed at present to better prevent infection disparities in future viral pandemics.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12939-023-01936-0.