Doctor Doom has defeated Magneto in official Marvel comic books before, but that does not mean this is always the case. Those comics were published in the 1970s, and as of 2014, new ones are being published all the time.
In "Super-Villain Team-Up #14," published in October 1977, Doctor Doom released a mind-controlling gas that made Magneto attack himself. It was only because Doom spared Magneto that the mutant did not die. In "Champions #16," published in November 1978, Doctor Doom reversed his armor's polarity to defeat Magneto. Magneto had attempted to crush Doom's metal armor, but Doom was able to reverse the force and use it against the mutant.