Disclosed are a composition for preparing a thermosetting resin and a cured article thereof, a prepreg including the cured article, and a metal foil laminated plate and a printed wiring board employing the prepreg. The composition for preparing a thermosetting resin comprises an aromatic polyester amide copolymer with excellent flame retardancy having an amine end group and/or a hydroxyl end group, an epoxy resin, and an optional bismaleimide.