In the current study, divers pyrimidine-fused heterocycles containing an imidazole, benzimidazole, or theophylline moieties were synthesized. For the synthesis of this category of compounds, first, some new bromo-substituted aldehydes (BSAs) were synthesized using reaction of 4-hydroxybenzaldehyde and dibromides. Then, BSAs were reacted with imidazole, benzimidazole, and theophylline in order to synthesize corresponding heterocyclic-substituted aldehydes (HSAs). Finally, the synthesized HSAs underwent in a multi-components reaction with barbituric acids, amines, and dimedone in the presence of magnetic nanoparticles-supported tungstic acid (MNP-TA) catalyst in order to synthesis target products in good to excellent yields. The MNP-TA was reusable using an external magnetic field and providing a clean and efficient reaction conditions for efficient synthesis of this class of compounds.