The Moldovan Olympic Committee says it removed Marghieva from the team after the governing body of athletics, the IAAF, notified that she failed a drug test before the games.
The Olympic body says the 26-year-old athlete's backup sample will be tested to confirm a doping violation. The substance was not identified.
Marghieva was due to compete in her second Summer Games in the qualification round on Wednesday.
Her 24-year-old sister, Zalina, also in entered in the hammer event. They are coached by their father, Soslan Marghiev.